The secondary sort order for tickets cannot be changed here: /admin/support/settings/general. It is just a copy of the primary sort order. Looking at the code I can see a simple error. It is using the default instead of the secondary one.

'#default_value' => variable_get('support_default_sort_order', SUPPORT_SORT_DESC),
// needs to change to:
'#default_value' => variable_get('support_secondary_sort_order', SUPPORT_SORT_DESC),

Comments

andrewfn’s picture

Status: Active » Needs review
StatusFileSize
new618 bytes

Here is a patch for 7.x-1.x-dev

andrewfn’s picture

And here is the same patch for Drupal 6.x

andrewfn’s picture

StatusFileSize
new1.18 KB

On closer examination, even with the above patch which successfully allows the secondary sort order to be set, nothing actually changes. This is because the variable is never used. In this patch I have simply copied the code for the default order (from a few lines above) and used it to set the secondary sort order.

if (variable_get('support_secondary_sort_order', SUPPORT_SORT_DESC) == SUPPORT_SORT_DESC) {
  $order = 'desc';
}
else {
  $order = 'asc';
}

This seems to work fine. Here is the complete 7.x patch:

andrewfn’s picture

And again for Drupal 6.x

jeremy’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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