Comments

Status: Needs review » Needs work

The last submitted patch, stormteam.multiple_select.patch, failed testing.

juliangb’s picture

Needs retest after #684016: Fix E_NOTICE notifications is fixed.

juliangb’s picture

Status: Needs work » Needs review

stormteam.multiple_select.patch queued for re-testing.

juliangb’s picture

RTBC from a read through, but would like someone to test before marking so please.

juliangb’s picture

Status: Needs review » Needs work

Two 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.

carsten müller’s picture

StatusFileSize
new3.59 KB

Hi,

i improved the patch:

  • only 10 lines are visible
  • '-' is renamed into '- none -'
  • 'People:' and 'Organizations:' are now optgroups
$options = array(0 => '- none -');
  
  $s_per = "SELECT n.nid, n.title FROM {node} n INNER JOIN {stormperson} spe ON n.vid=spe.vid WHERE n.type='stormperson' ORDER BY n.title";
  $s_per = stormperson_access_sql($s_per);
  $s_per = db_rewrite_sql($s_per);
  $r_per = db_query($s_per);
  $people = array();
  while ($person = db_fetch_object($r_per)) {
    $people[$person->nid] = $person->title;
  }
  
  $options = $options + array(t('People:') => $people) ;
  
  $s_org = "SELECT n.nid, n.title FROM {node} n WHERE n.type='stormorganization' ORDER BY n.title";
  $s_org = stormorganization_access_sql($s_org);
  $s_org = db_rewrite_sql($s_org);
  $r_org = db_query($s_org);
  $organizations = array();
  while ($organization = db_fetch_object($r_org)) {
    $organizations[$organization->nid] = $organization->title;
  }
  
  $options = $options + array(t('Organizations:') => $organizations);
  
  $default = array();
  if (!empty($node->members_array)) {
    $default = array_keys($node->members_array);
  }
  
  $form['group1']['members_array'] = array(
    '#type' => 'select',
    '#title' => t('Team Member @num', array('@num' => $i)),
    '#options' => $options,
    '#default_value' => $default,
    '#multiple' => TRUE,
    '#size' => 10,
  );
juliangb’s picture

Status: Needs work » Needs review

Marking CNR for testbot.

juliangb’s picture

Status: Needs review » Needs work

Minor 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.

carsten müller’s picture

ok, i will check that as soon as possible

carsten müller’s picture

StatusFileSize
new7.66 KB

ok, 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

juliangb’s picture

Status: Needs work » Needs review

CNR for testbot.

juliangb’s picture

Status: Needs review » Needs work

PHP errors on viewing existing teams:

# Warning: Invalid argument supplied for foreach() in theme_stormteam_view() (line 36 of /[root]/sites/all/modules/storm/stormteam/stormteam.theme.inc).
# Warning: implode() [<a href='function.implode'>function.implode</a>]: Invalid arguments passed in theme_stormteam_view() (line 62 of /[root]/sites/all/modules/storm/stormteam/stormteam.theme.inc).
carsten müller’s picture

Status: Needs work » Needs review
StatusFileSize
new8.92 KB

sh..., i have forgotten the old structure, sorry for that, but now it should work with old and new structure

juliangb’s picture

Perhaps a database update to the new format would be better than supporting both formats?

carsten müller’s picture

i 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

juliangb’s picture

Hi 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

juliangb’s picture

Status: Needs review » Needs work
carsten müller’s picture

Status: Needs work » Needs review
StatusFileSize
new10.16 KB

Hi,,

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

Anonymous’s picture

juliangb’s picture

Status: Needs review » Needs work

Two 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.

tchurch’s picture

I've downloaded this patch and installed it and ran the DB updates. It looks OK so far.

Wes Ashworth’s picture

I'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.

juliangb’s picture

A 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.

Wes Ashworth’s picture

StatusFileSize
new19.84 KB

Sorry, here's the txt file. Any way to attach your patched files?

Thx

juliangb’s picture

There is a typo on line 280 of your file.

It should be $options = $options + ...

Wes Ashworth’s picture

It 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.

juliangb’s picture

@Carsten Müller, would you have a moment to revisit this patch at all?

carsten müller’s picture

Hi 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

carsten müller’s picture

StatusFileSize
new10.17 KB

okay, 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.

carsten müller’s picture

Status: Needs work » Needs review
Wes Ashworth’s picture

I'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

juliangb’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev

Thanks, needs retesting on the new 2.x, but it shouldn't change anything.

@Wes Ashworth, see http://drupal.org/patch/apply .

juliangb’s picture

#29: stormteam.multiple_select.patch queued for re-testing.

juliangb’s picture

Minor 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.

+++ stormteam/stormteam.install	(working copy)
@@ -87,3 +87,52 @@
+ * Uddate for Multiple Select for Teammembers

Typo - Uddate / Update

Also, there is trailing whitespace on some lines which should be removed. Dreditor can spot this very easily.

Powered by Dreditor.

carsten müller’s picture

StatusFileSize
new9.97 KB

Hi,

removeds typo and some whitespaces. But the whitespaces doesn't matter.

Status: Needs review » Needs work

The last submitted patch, stormteam.multiple_select.patch, failed testing.

carsten müller’s picture

StatusFileSize
new9.97 KB

Here again with the new filename

juliangb’s picture

I tried to reroll this patch for the testbot, but got an error on patching - malformed patch.

Tried #35 and #37.

carsten müller’s picture

Hi,

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?

juliangb’s picture

The 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

carsten müller’s picture

Status: Needs work » Needs review
StatusFileSize
new19.19 KB

Hi,

here is a modified patch to fit against the 6.x-2.x-dev version

juliangb’s picture

Would 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...

+++ stormteam/stormteam.install	(working copy)
@@ -87,3 +87,51 @@
+function stormteam_update_6102() {

This needs to start 62xx as the patch will go into the 2.x branch.

+++ stormteam/stormteam.module	(working copy)
@@ -247,13 +247,13 @@
   $breadcrumb = array(
-    l('Storm', 'storm'),
-    l('Teams', 'storm/teams'),
+  l('Storm', 'storm'),
+  l('Teams', 'storm/teams'),
   );

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.

carsten müller’s picture

ok, 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

carsten müller’s picture

Assigned: Unassigned » carsten müller
Status: Needs review » Needs work

needs updated to new sql structure of stormteam

carsten müller’s picture

Status: Needs work » Needs review
StatusFileSize
new14.67 KB

patch 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

carsten müller’s picture

StatusFileSize
new14.89 KB

Patch reexported in git format, maybe this works
or maybe there is a problem with the repositor on drupal.org

carsten müller’s picture

FAILED: [[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

juliangb’s picture

I've opened #1081082: Git clone fails during patch testing in the infrastructure queue as this seems to be a problem with the testbot.

Status: Needs review » Needs work

The last submitted patch, stormteam-multiple-848444-7-git.patch, failed testing.

rfay’s picture

Status: Needs work » Needs review
rfay’s picture

Setting to needs review to force another test

juliangb’s picture

Great 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?

carsten müller’s picture

Hi 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.

chertzog’s picture

subscribe

carsten müller’s picture

So, 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.

juliangb’s picture

Sorry 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.

carsten müller’s picture

Hi,

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.

juliangb’s picture

Status: Needs review » Fixed

I've just successfully tested and pushed this into Git.

Sorry that I haven't had a chance to look sooner.

juliangb’s picture

Status: Fixed » Needs work

I 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.

carsten müller’s picture

Hi,

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.

juliangb’s picture

No problem - that's how it is for everyone.

trevorbradley’s picture

Status: Needs work » Needs review
StatusFileSize
new2.69 KB

I 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.

Status: Needs review » Needs work

The last submitted patch, storm-teammember-multiselect-848444-62.patch, failed testing.

trevorbradley’s picture

Wait, 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.

Jonas Bärtsch’s picture

I 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.

screenshot01

screenshot01

Raphael Dürst’s picture

Status: Needs work » Needs review
StatusFileSize
new10.87 KB

I made a multiple select for the teammembers.

Patch is in the attachment.

Status: Needs review » Needs work

The last submitted patch, storm-stormteam-multiple-select-848444-65.patch, failed testing.

Raphael Dürst’s picture

Status: Needs work » Needs review
StatusFileSize
new13.85 KB

I had to edit some of the .test-files because i changed the form.
I ran it through simpletest, it should work properly now.

Status: Needs review » Needs work

The last submitted patch, storm-stormteam-multiple-select-848444-67.patch, failed testing.

Raphael Dürst’s picture

Status: Needs work » Needs review
StatusFileSize
new14.03 KB

These exceptions weren't displayed in my simpletest... strange.
Now it should really pass the tests. ;)

Raphael Dürst’s picture

Oops... I fixed this bug too fast and didn't test it properly, sorry.
I just introduced another bug... but it's fixed now.

francewhoa’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new47.55 KB
new61.61 KB

I 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/stormteam
2. 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

juliangb’s picture

Version: 6.x-2.x-dev » 7.x-1.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Thanks 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.

francewhoa’s picture

Same thing, make sense to me :)

Any volunteer to port this patch? I would be happy to contribute testing.