Hi,

added a little patch to fix the sorting in the function storm_get_assignment_options() in storm.module. The assignments are first fetched from the projects ($project->assigned_nid) but not sorted alphabetically.

So, just add these lines at the end of the function

// SORT OPTIONS
asort($options[$people], SORT_LOCALE_STRING);
asort($options[$teams], SORT_LOCALE_STRING);

Comments

Status: Needs review » Needs work

The last submitted patch, storm.get_assignment_options_sort.patch, failed testing.

juliangb’s picture

Needs retesting after #684016: Fix E_NOTICE notifications has been fixed.

carsten müller’s picture

StatusFileSize
new395 bytes

added again for testing

juliangb’s picture

Status: Needs work » Needs review

CNR to test.

juliangb’s picture

Status: Needs review » Fixed

Committed, thanks.

juliangb’s picture

Status: Fixed » Reviewed & tested by the community

This patch needs reversing because on the latest -dev I am now getting these errors on the ticket add/edit form.

    * Warning: asort() expects parameter 1 to be array, null given in storm_get_assignment_options() (line 1011 of /home/modulede/public_html/drupal6-storm/sites/all/modules/storm/storm.module).
    * Warning: asort() expects parameter 1 to be array, null given in storm_get_assignment_options() (line 1012 of /home/modulede/public_html/drupal6-storm/sites/all/modules/storm/storm.module).
juliangb’s picture

Status: Reviewed & tested by the community » Needs work

Reverted.

carsten müller’s picture

StatusFileSize
new542 bytes

ok, i imroved the patch and added the check if the options are not empty. I should have added it just to the beginning. The error occurs if no teams or people are available.

Here the new code

 // SORT OPTIONS
  if (!empty($options[$people]) && is_array($options[$people])) {
    asort($options[$people], SORT_LOCALE_STRING);
  } 
  if (!empty($options[$teams]) && is_array($options[$teams])) {
    asort($options[$teams], SORT_LOCALE_STRING);
  }
carsten müller’s picture

Status: Needs work » Needs review

changed to needs review for patch testing

juliangb’s picture

juliangb’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.