diff --git a/include/staff/tickets.inc.php b/include/staff/tickets.inc.php index 9f74d1cb1e56af233bda2eb89cbd8ac34af26728..f0d4a6b2d5cecc791158f4af4fd646397442f2b5 100644 --- a/include/staff/tickets.inc.php +++ b/include/staff/tickets.inc.php @@ -77,10 +77,13 @@ case 'search': case 'open': $status='open'; $results_type=__('Open Tickets'); + $showassigned = ($cfg && $cfg->showAssignedTickets()) || $thisstaff->showAssignedTickets(); if (!$cfg->showAnsweredTickets()) $tickets->filter(array('isanswered'=>0)); - if (!$cfg || !($cfg->showAssignedTickets() || $thisstaff->showAssignedTickets())) + if (!$showassigned) $tickets->filter(Q::any(array('staff_id'=>0, 'team_id'=>0))); + else + $tickets->values('staff__firstname', 'staff__lastname', 'team__name'); break; } @@ -287,7 +290,7 @@ $_SESSION[':Q:tickets'] = $tickets; $dept = Dept::getLocalById($T['dept_id'], 'name', $T['dept__name']); if($showassigned) { if($T['staff_id']) - $lc=sprintf('<span class="Icon staffAssigned">%s</span>',Format::truncate((string) new PersonsName($T['staff__firstname'], $T['staff__lastname']),40)); + $lc=sprintf('<span class="Icon staffAssigned">%s</span>',Format::truncate((string) new PersonsName($T['staff__firstname'].' '.$T['staff__lastname']),40)); elseif($T['team_id']) $lc=sprintf('<span class="Icon teamAssigned">%s</span>', Format::truncate(Team::getLocalById($T['team_id'], 'name', $T['team__name']),40));