diff --git a/include/staff/tickets.inc.php b/include/staff/tickets.inc.php index 624376c9b7b0c412682a00e5fcaf47cb6ddd7976..f02ae8dc16cfd5068de4be809d331f3e1a9abce7 100644 --- a/include/staff/tickets.inc.php +++ b/include/staff/tickets.inc.php @@ -227,7 +227,7 @@ $pageNav->setURL('tickets.php',$qstr.'&sort='.urlencode($_REQUEST['sort']).'&ord $qselect.=' ,count(attach.attach_id) as attachments ' .' ,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 ' - .' ,GREATEST(IFNULL(ticket.lastmessage, 0), IFNULL(ticket.reopened, 0), ticket.created) as effective_date ' + .' ,CAST(GREATEST(IFNULL(ticket.lastmessage, 0), IFNULL(ticket.reopened, 0), ticket.created) as datetime) as effective_date ' .' ,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(ptopic.topic_pid IS NULL, topic.topic, CONCAT_WS(" / ", ptopic.topic, topic.topic)) as helptopic ';