Sort tickets by name in Staff panel

1 post / 0 new
brettermeier
Offline
Last seen: 4 years 1 month ago
Joined: 18/08/2015 - 11:50
Sort tickets by name in Staff panel

Is there a possibility to add a sort by name function to the staff panel?

I'm looking around in the sorting options, but I'm not good at it...

Thank you :)

//Sorting options list
$sortOptions=array('date'=>'ticket.created','ID'=>'ticketID','pri'=>'priority_urgency','dept'=>'dept_name');
$orderWays=array('DESC'=>'DESC','ASC'=>'ASC');

//Sorting options...
if($_REQUEST['sort']) {
$order_by =$sortOptions[$_REQUEST['sort']];
}
if($_REQUEST['order']) {
$order=$orderWays[$_REQUEST['order']];
}
if($_GET['limit']){
$qstr.='&limit='.urlencode($_GET['limit']);
}
if(!$order_by && !strcasecmp($status,'closed')){
$order_by='ticket.closed DESC, ticket.created'; //No priority sorting for closed tickets.
}elseif(!$order_by) {
$order_by='ticket.lastresponse DESC, ticket.created';
}