Hello again,
The code below allows you to show the person the ticket is assigned to in the staff control panel. I include a few of the previous lines to help you find where to paste the code as always.
/include/staff/tickets.inc.php (line 157)
$pagelimit=$pagelimit?$pagelimit; //true default...if all fails.
$page=($_GET && is_numeric($_GET))?$_GET;
// *** Edited by webPragmatist
$qselect = 'SELECT ticket.ticket_id,lock_id,ticketID,ticket.dept_id,ticket.staff_id,subject,name,ticket.email,dept_name,staff.username '.
',status,source,isoverdue,ticket.created,pri.* ';
$qfrom=' FROM '.TICKET_TABLE.' ticket LEFT JOIN '.DEPT_TABLE.' dept ON ticket.dept_id=dept.dept_id '.
' LEFT JOIN '.TICKET_PRIORITY_TABLE.' pri ON ticket.priority_id=pri.priority_id '.
' LEFT JOIN '.TICKET_LOCK_TABLE.' tlock ON ticket.ticket_id=tlock.ticket_id AND tlock.expire>NOW() '.
' LEFT JOIN '.STAFF_TABLE.' staff ON ticket.staff_id=staff.staff_id';
// *** End edit by webPragmatist
/include/staff/tickets.inc.php (line 330)
<th width="110">
<a href="tickets.php?sort=dept&order=<?=$negorder?><?=$qstr?>" title="Sort By Category <?=$negorder?>">Department</a></th>
Addition by webPragmatist
<th width="150" ><a href="tickets.php?sort=ass&order=<?=$negorder?><?=$qstr?>" title="Sort By Assignee <?=$negorder?>">Assigned To</a></th>
End addition by webPragmatist
/include/staff/tickets.inc.php (line 367)
<td nowrap><?=Format:($row,30)?></td>
Addition by webPragmatist
<td nowrap><?=($row) ? $row : 'Not assigned';?></td>
End addition by webPragmatist
/include/staff/tickets.inc.php (line 140)
endif;
//I admit this crap sucks...but who cares??
// Addition by webPragmatist
$sortOptions=array('date'=>'ticket.created','ID'=> 'ticketID','pri'=>'priority_urgency','dept'=>'dept _name','ass'=>'username');
// End addition by webPragmatist
Thanks Tonyb for the sorting addition!