Skip to content
Snippets Groups Projects
Commit 3a738361 authored by Jared Hancock's avatar Jared Hancock
Browse files

oops: Fix showassigned on open queue

parent baf5da56
No related branches found
No related tags found
No related merge requests found
......@@ -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));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment