Patch (to be ported)
Project:
Storm
Version:
7.x-1.x-dev
Component:
Storm Team
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
8 Jul 2010 at 14:37 UTC
Updated:
15 Jan 2013 at 20:27 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
juliangb commentedNeeds retest after #684016: Fix E_NOTICE notifications is fixed.
Comment #3
juliangb commentedstormteam.multiple_select.patch queued for re-testing.
Comment #4
juliangb commentedRTBC from a read through, but would like someone to test before marking so please.
Comment #5
juliangb commentedTwo things from testing:
- The select box is very tall. Would it be possible to make it smaller please? Perhaps 10 lines are visible (or better fewer).
- The first entry is now even less intuitive. We should rename it '- none -' perhaps rather than '-'.
Should be a great improvement though.
Comment #6
carsten müller commentedHi,
i improved the patch:
Comment #7
juliangb commentedMarking CNR for testbot.
Comment #8
juliangb commentedMinor point - label now can be plural.
More major point - team members don't seem to be saved correctly. I just tried creating a team - it remembers which team members are selected (because when edit is clicked they are still there), but on node view do not display.
On editing and saving an existing team, same thing happens.
Comment #9
carsten müller commentedok, i will check that as soon as possible
Comment #10
carsten müller commentedok, here is the new patch containing the bug fixes and some improvements
i separated also people and organizations in the view
sorry, for the buggy patch, but at the moment i have to work on Facebook Apps (makes no fun ...) and Storm is just additionally
Comment #11
juliangb commentedCNR for testbot.
Comment #12
juliangb commentedPHP errors on viewing existing teams:
Comment #13
carsten müller commentedsh..., i have forgotten the old structure, sorry for that, but now it should work with old and new structure
Comment #14
juliangb commentedPerhaps a database update to the new format would be better than supporting both formats?
Comment #15
carsten müller commentedi first though about that. But we have by now about 400 Projekcts and around 300 Teams. For every team i have to select the team members and have to load if it is a person or an organization by using node_load() or asking the database directly. That will take some time and will fetch a lot of memory. I'm not sure if the performance will kill slow servers with few memory if there are a lot of teams. It's no problem if there are just a few teams, but we have by now over 300 Teams. That will cost a lot.
I can try to create a database update. But if it fails all teams in the database are broken. With this solution a team is converted when it is saved again. So the teams are transfered one by one and if there is a bug not all teams are affected. I though this may be the better solution if there is still a bug which is not found before the next release is out.
The support of the old structure can be deleted after a couple of time, maybe in the next release of storm.
But if desired i can also create a database update. But i'm not sure if it will work on environments with a lot of teams.
kind regards
Carsten
Comment #16
juliangb commentedHi Carsten,
I left this for a while in case anybody else had views on it - but I think it would be better to update the data straight off - if you have concerns about scalability, then perhaps it could be done using the batch api. The reason is that a number of people do not upgrade to every release, so I think it is important to ensure the change is done cleanly - rather than leaving the possibility of having half of the data stored in each format.
Hope thats ok,
Julian
Comment #17
juliangb commentedComment #18
carsten müller commentedHi,,
here is the new patch without handling the old data structure but with updating all teams to the new structure by using a database update.
This must now be tested
Comment #19
Anonymous (not verified) commentedComment #20
juliangb commentedTwo points from my readthrough:
- Minor spelling errors in doxygen comment - Implementation and Update
- We shouldn't use the access_sql() functions in db updates as we want to update all records
I haven't been able to test yet.
Comment #21
tchurch commentedI've downloaded this patch and installed it and ran the DB updates. It looks OK so far.
Comment #22
Wes Ashworth commentedI'm getting the following error:
Parse error: syntax error, unexpected T_ARRAY in /home2/pmtbsmit/public_html/drupal/sites/all/modules/storm/stormteam/stormteam.module on line 280
I've checked my patch 3 times.
Comment #23
juliangb commentedA better way of posting this amount of code would be in an attached text file, or via a link to a pastebin. It is hard to help with it in this format.
Bear in mind that the patch may need reworking to account for changes in Storm since it was created.
Also, I'm quite keen to get something like this in once I'm happy with the patch.
Comment #24
Wes Ashworth commentedSorry, here's the txt file. Any way to attach your patched files?
Thx
Comment #25
juliangb commentedThere is a typo on line 280 of your file.
It should be
$options = $options + ...Comment #26
Wes Ashworth commentedIt allows me to select multiple persons for a team, now, but when I try to assign a task, the pull down only shows the project manager, and the team, not individuals on the team.
Comment #27
juliangb commented@Carsten Müller, would you have a moment to revisit this patch at all?
Comment #28
carsten müller commentedHi juliangb,
yes, i will try to find some time. sorry, but in the last weeks was no time to work on storm / storm_contrib. But i hope it will become better now.
I will test the patch as soon as posible
Comment #29
carsten müller commentedokay, i had a look and reviewd the patch and the file from Wes Ashworth
i attached the new path with the following changes:
- fixed spelling Implementation
- fixed using access_sql() - has been removed in hook_update()
@ Wes Ashworth
As juliangb already said there is an error in your line 280 in the stormteam.module
It has to be $options = $options + array(t('People:') => $people) ;
Else the people are not attached to the options array and not available for selection
I don't know how this bug came into your code. The patch sais
$options = $options + array(t('People:') => $people) ;
So try the new patch and then post if it is working.
Comment #30
carsten müller commentedComment #31
Wes Ashworth commentedI'm not smart enough to figure out how to implement the patch programatically, so I input changes by hand. Sucky way to do it.
Thanks,
Wes
Comment #32
juliangb commentedThanks, needs retesting on the new 2.x, but it shouldn't change anything.
@Wes Ashworth, see http://drupal.org/patch/apply .
Comment #33
juliangb commented#29: stormteam.multiple_select.patch queued for re-testing.
Comment #34
juliangb commentedMinor changes needed from a read through of the patch.
I'd like to test this properly on an install too, which I'll try to do soon so that this can go in if poss.
Typo - Uddate / Update
Also, there is trailing whitespace on some lines which should be removed. Dreditor can spot this very easily.
Powered by Dreditor.
Comment #35
carsten müller commentedHi,
removeds typo and some whitespaces. But the whitespaces doesn't matter.
Comment #37
carsten müller commentedHere again with the new filename
Comment #38
juliangb commentedI tried to reroll this patch for the testbot, but got an error on patching - malformed patch.
Tried #35 and #37.
Comment #39
carsten müller commentedHi,
the patch is written for 6.x.1.35, not for the 2.x branch. I'm still working with the 1.x branch.
If i have got some time, i will check out the 2.x branch and write a patch for it.
Why do you have opened a 2.x branch? Is storm going to be rewritten?
Comment #40
juliangb commentedThe 2.x branch was opened for 2 reasons:
- To allow continued development whilst giving a more stable branch for those who are happy with the current level of features
- To allow for more disruptive features such as a mandatory dependency on views
See #1011492: Storm 6.x-2.x branch
Comment #41
carsten müller commentedHi,
here is a modified patch to fit against the 6.x-2.x-dev version
Comment #42
juliangb commentedWould it be possible to have a quick conversation with minorOffense on the data structures here please? (See #1052154: Storm Team module schema). I'd just like to make sure the changes you're both suggesting are on the same page, so that we don't end up changing things down the road.
A couple of points from within the code too, but otherwise I think we're there...
This needs to start 62xx as the patch will go into the 2.x branch.
There are a couple of moments like this - where the indentation has been changed on areas not affected by the patch. To me, this new structure is less clear. Is there a reason why this change was made?
Powered by Dreditor.
Comment #43
carsten müller commentedok, the new structure is fine. I will check that and will try to use the new structure and adding the multiple select.
I will post the patch under #1052154
But maybe that will take some time because i'm busy
Comment #44
carsten müller commentedneeds updated to new sql structure of stormteam
Comment #45
carsten müller commentedpatch for multiple select of teammembers with switch in admin settings
default is the old selection with a field for each teammember, can be switched in settings to one multiple selection field
includes also a checkbox to remove the stormorganizations from the selection
patched queued for testing
Comment #46
carsten müller commentedPatch reexported in git format, maybe this works
or maybe there is a problem with the repositor on drupal.org
Comment #47
carsten müller commentedFAILED: [[SimpleTest]]: [MySQL] Repository checkout: failed to checkout from [git://git.drupal.org/project/storm.git].
No idea whats going on. I check the drupal issues
Comment #48
juliangb commentedI've opened #1081082: Git clone fails during patch testing in the infrastructure queue as this seems to be a problem with the testbot.
Comment #50
rfay#46: stormteam-multiple-848444-7-git.patch queued for re-testing.
Comment #51
rfaySetting to needs review to force another test
Comment #52
juliangb commentedGreat now that the Testbot is ok-ing the patches again!
Carsten, is it worth having the admin switch between a multiple select and the existing? Surely this is a great usability improvement that we could assume most people would want.
We might be able to simplify by moving entirely to the new system?
Comment #53
carsten müller commentedHi Julian,
i think there may be the problem that some people in some companies do not know how to use a multiple select by pressing the CTRL key. Maybe they deselect the whole team by assigning another person. So i think we should leave the decision to the site admins which team selection they want. They know their company members better than we do.
That is why i added the switch and offer both possibilities. I know some users who don't know how to use it and i know they will deselect team members by accident. But they'll get a short training so we can switch to multiple selection.
Comment #54
chertzogsubscribe
Comment #55
carsten müller commentedSo, what is the result now? Should we offer both possibilities or onl the new multiple selection?
I would like to offer both but i also want your opinion Julian.
then i can commit the patch to storm and we can close this issue after a couple of months.
Comment #56
juliangb commentedSorry for not responding. It sounds like there are good reasons for providing the options.
I haven't marked this as RTBC or committed yet because I haven't had time to test, but I have no further questions about this, feel free to commit if you feel that it is ready.
Feel free to commit things if you feel they are ready - no need to wait for me if I'm holding things up.
Comment #57
carsten müller commentedHi,
i just wanted to check if everybody agrees with this solution. Thats all. I will test it again before i will check that in. At the moment i am at a customer this week, so i'm not sure when i will find the time for that. But i'm trying to get this ready before easter.
Comment #58
juliangb commentedI've just successfully tested and pushed this into Git.
Sorry that I haven't had a chance to look sooner.
Comment #59
juliangb commentedI spoke too soon. Continued with the patch applied and on viewing the team node, got the word "Array" instead of a list of teammembers.
Reverted patch for now until this can be fixed.
Comment #60
carsten müller commentedHi,
sorry, i am very busy at the moment because of a lot of projects and private tasks. But iÄm looking forward to find more time working on storm. The time horizont displays some light at the beginning of june. I'm very sorry about this but storm does not pay my bills.
Comment #61
juliangb commentedNo problem - that's how it is for everyone.
Comment #62
trevorbradley commentedI saw that this patch didn't apply against the current 6.x-2.x-dev without breaking, so I rewrote it. I don't see an array with the list of team members, but I'm too new to Storm to know what else it actually breaks. YMMV.
Comment #64
trevorbradley commentedWait, that was really dumb of me, I only saw the first page of Carsten's patch. Amazingly, it did let me define teams of arbitrary size... However, the scope of the problem is larger than I'd originally thought... I'm going to have to pass on this one unless I actually commit to Storm for project management.
Comment #65
Jonas Bärtsch commentedI am currently working on a Project using Storm. For stormteam I could imagine the following adjustment (images). If we get some feedback we could provide a patch.
Comment #66
Raphael Dürst commentedI made a multiple select for the teammembers.
Patch is in the attachment.
Comment #68
Raphael Dürst commentedI had to edit some of the .test-files because i changed the form.
I ran it through simpletest, it should work properly now.
Comment #70
Raphael Dürst commentedThese exceptions weren't displayed in my simpletest... strange.
Now it should really pass the tests. ;)
Comment #71
Raphael Dürst commentedOops... I fixed this bug too fast and didn't test it properly, sorry.
I just introduced another bug... but it's fixed now.
Comment #72
francewhoaI tested patch in comment 71. This is an awesome new feature. Easier to add or remove team members. Thanks all :)
There is an issue with the display of "Team Names" though. Steps to reproduce:
1. Go to
/node/add/stormteam2. Create a new team. Add two team members. Click on "Save" button.
3. Issue is on the next page at
/storm/teams. Under "Team Name" column. The "Team Name" is display twice. They both link to the same node. Find attached screenshots to clarify. Expected result is the "Team Name" should be display only once.If you redo above steps but add three team members the Team Name is display three times. And so on.
Using
* Fresh Drupal 6.27
* Storm 2.x-1.x-dev 2012-Oct-20
Comment #73
juliangb commentedThanks for testing.
Considering that we've started with the port to Drupal 7 now, we need to have a patch for D7 before D6.
Sorry for the inconvenience, but I'm sure you'll agree this is best practice for the longer term.
Comment #74
francewhoaSame thing, make sense to me :)
Any volunteer to port this patch? I would be happy to contribute testing.