Skip to content
Snippets Groups Projects
Commit df9c106f authored by Peter Rotich's avatar Peter Rotich
Browse files

Prefer last message date to reopened date for default sort order

- Tickets will recent replies from the user floats to the top.
- Priority still tops the effective
parent 0cfb1aa9
No related branches found
No related tags found
No related merge requests found
...@@ -227,7 +227,9 @@ $pageNav->setURL('tickets.php',$qstr.'&sort='.urlencode($_REQUEST['sort']).'&ord ...@@ -227,7 +227,9 @@ $pageNav->setURL('tickets.php',$qstr.'&sort='.urlencode($_REQUEST['sort']).'&ord
$qselect.=' ,count(attach.attach_id) as attachments ' $qselect.=' ,count(attach.attach_id) as attachments '
.' ,count(DISTINCT thread.id) as thread_count ' .' ,count(DISTINCT thread.id) as thread_count '
.' ,IF(ticket.duedate IS NULL,IF(sla.id IS NULL, NULL, DATE_ADD(ticket.created, INTERVAL sla.grace_period HOUR)), ticket.duedate) as duedate ' .' ,IF(ticket.duedate IS NULL,IF(sla.id IS NULL, NULL, DATE_ADD(ticket.created, INTERVAL sla.grace_period HOUR)), ticket.duedate) as duedate '
.' ,IF(ticket.reopened is NULL,IF(ticket.lastmessage is NULL,ticket.created,ticket.lastmessage),ticket.reopened) as effective_date ' .' ,IF(ticket.lastmessage is NULL,IF(ticket.reopened is NULL,ticket.created,ticket.reopened),
IF(ticket.reopened is NOT NULL AND ticket.reopened>ticket.lastmessage,
ticket.reopened, ticket.lastmessage ) ) as effective_date '
.' ,CONCAT_WS(" ", staff.firstname, staff.lastname) as staff, team.name as team ' .' ,CONCAT_WS(" ", staff.firstname, staff.lastname) as staff, team.name as team '
.' ,IF(staff.staff_id IS NULL,team.name,CONCAT_WS(" ", staff.lastname, staff.firstname)) as assigned ' .' ,IF(staff.staff_id IS NULL,team.name,CONCAT_WS(" ", staff.lastname, staff.firstname)) as assigned '
.' ,IF(ptopic.topic_pid IS NULL, topic.topic, CONCAT_WS(" / ", ptopic.topic, topic.topic)) as helptopic '; .' ,IF(ptopic.topic_pid IS NULL, topic.topic, CONCAT_WS(" / ", ptopic.topic, topic.topic)) as helptopic ';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment