DIfficult for groups of users to work together on Job tracking when list order changes with each update

rar - June 22, 2009 - 16:18
Project:Support Ticketing System
Version:6.x-1.0
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

Problem. Everyone selects "order by priority" then someone comes in a second later after an update has been done. They also select "order by priority" but the list order is different. Suggested patch - have secondary sort by # (works for us and everyone is happy).

Add $sql .= ', t.nid DESC ';
to query.

*** 1895,1900 ****
--- 1895,1901 ----
    }
    $sql = db_rewrite_sql($sql);
    $sql .= tablesort_sql($header);
+   $sql .= ', t.nid DESC ';
    $sql_count = "SELECT COUNT(DISTINCT(n.nid)) FROM {node} n LEFT JOIN {comments} c ON n.nid = c.nid AND (c.status = %d OR c.status IS NULL) LEFT JOIN {support_ticket} t ON n.nid = t.nid WHERE n.status = 1 AND client = $client $state $my_open";
    $sql_count = db_rewrite_sql($sql_count);
    $result = pager_query($sql, 50, 0, $sql_count);

#1

rar - June 24, 2009 - 14:27
Version:6.x-1.0-rc1» 6.x-1.0

Updated - to most recent version also issue with 1.0.

diff -p support.oldmod support.module

*************** function support_page($client = NULL, $s
*** 1932,1937 ****
--- 1932,1938 ----
    }
    $sql = db_rewrite_sql($sql);
    $sql .= tablesort_sql($header);
+   $sql .= ', t.nid DESC ';
    $sql_count = "SELECT COUNT(DISTINCT(n.nid)) FROM {node} n LEFT JOIN {comments} c ON n.nid = c.nid AND (c.status = %d OR c.status IS NULL) LEFT JOIN {support_ticket} t ON n.nid = t.nid WHERE n.status = 1 AND client = $client $state $my_open";
    $sql_count = db_rewrite_sql($sql_count);
    $result = pager_query($sql, 50, 0, $sql_count);

#2

Jeremy - July 9, 2009 - 20:42
Status:active» fixed

I agree that this would be useful, however I'm not sure everyone would want the secondary sort column to be the node ID. Feature implemented as a configuration option. In the latest version of the code, visit Administer >> Support ticketing system >> Settings to set a "Secondary sort column".

#3

System Message - July 23, 2009 - 20:50
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.