This hack allows you to add a column for who the task is assigned to, as well as the email address of the person who created the task.
It also allows you to order by the email of who created it, and also by the domain of the person who created it (handy if you work with lots of different companies).
There is really only one page that needs to be updated:
include/staff/tickets.inc.php
Approx line: 183: Add new search options.
//I admit this crap sucks...but who cares??
$sortOptions=array('date'=>'ticket.created','ID'=>'ticketID','pri'=>'priority_urgency','dept'=>'dept_name','ass'=>'username','email'=>'ticket.email','domain'=>'SUBSTR(ticket.email, LOCATE("@",ticket.email)),ticket.email');
$orderWays=array('DESC'=>'DESC','ASC'=>'ASC');
Approx line: 209: Add additional fields and ALIAS them.
$qselect = 'SELECT DISTINCT ticket.ticket_id,lock_id,ticketID,ticket.dept_id,ticket.staff_id,subject,name,ticket.email as ticketEmail,dept_name '.
',ticket.status,ticket.source,isoverdue,isanswered,ticket.created,pri.* ,count(attach.attach_id) as attachments,staff.username ';
$qfrom=' FROM '.TICKET_TABLE.' ticket '.
' LEFT JOIN '.DEPT_TABLE.' dept ON ticket.dept_id=dept.dept_id ';
Approx line: 230: Link to the staff table
$qfrom.=' 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 '.TICKET_ATTACHMENT_TABLE.' attach ON ticket.ticket_id=attach.ticket_id '.
' LEFT JOIN '.STAFF_TABLE.' staff ON ticket.staff_id=staff.staff_id';
Approx line: 401: Add additional column headings with sort options
<th width="70">
<a href="tickets.php?sort=pri&order=<?=$negorder?><?=$qstr?>" title="Sort By Priority <?=$negorder?>">Priority</a></th>
<th width="180" ><a href="tickets.php?sort=email&order=<?=$negorder?><?=$qstr?>" title="Sort By Email <?=$negorder?>">From</a> 
<a href="tickets.php?sort=domain&order=<?=$negorder?><?=$qstr?>" title="Sort By Domain <?=$negorder?>">Domain</a></th>
<th width="120" ><a href="tickets.php?sort=ass&order=<?=$negorder?><?=$qstr?>" title="Sort By Assignee <?=$negorder?>">Assigned To</a></th>
</tr>
Approx line: 442: Add additional data columns
<td nowrap><?=Format:($row,30)?></td>
<td class="nohover" align="center" style="background-color:<?=$row?>;"><?=$row?></td>
<td nowrap><?=$row;?> </td>
<td nowrap><?=($row) ? $row : 'Unassigned';?></td>
</tr>
[tickets.inc.php.zip](https://forum.osticket.com/assets/files/migrated/5/a270d8f316e32ff30808a8e4c7254dc.zip)