From 06830be1584db5256547bc8ae4fb25ec4251f0ec Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Wed, 10 Dec 2014 15:16:50 -0600 Subject: [PATCH] queue: Reimplement collaborator icon --- include/staff/tickets.inc.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/staff/tickets.inc.php b/include/staff/tickets.inc.php index 8edd1c22d..9470d37dd 100644 --- a/include/staff/tickets.inc.php +++ b/include/staff/tickets.inc.php @@ -101,9 +101,14 @@ if (($teams = $thisstaff->getTeams()) && count(array_filter($teams))) )); $tickets->filter(Q::any($visibility)); +// Add in annotations +$tickets->annotate(array( + 'collab_count' => SqlAggregate::COUNT('collaborators') +)); + // Select pertinent columns // ------------------------------------------------------------ -$tickets->values('lock__lock_id', 'staff_id', 'isoverdue', 'team_id', 'ticket_id', 'number', 'cdata__subject', 'user__default_email__address', 'source', 'cdata__:priority__priority_color', 'cdata__:priority__priority_desc', 'status__name', 'status__state', 'dept_id', 'dept__name', 'user__name', 'lastupdate'); +$tickets->values('lock__lock_id', 'staff_id', 'isoverdue', 'team_id', 'ticket_id', 'number', 'cdata__subject', 'user__default_email__address', 'source', 'cdata__:priority__priority_color', 'cdata__:priority__priority_desc', 'status__name', 'status__state', 'dept_id', 'dept__name', 'user__name', 'lastupdate', 'collab_count'); // Apply requested quick filter @@ -307,7 +312,7 @@ $_SESSION[':Q:tickets'] = $tickets; if ($threadcount>1) echo "<small>($threadcount)</small> ".'<i class="icon-fixed-width icon-comments-alt"></i> '; - if ($row['collaborators']) + if ($T['collab_count']) echo '<i class="icon-fixed-width icon-group faded"></i> '; if ($row['attachments']) echo '<i class="icon-fixed-width icon-paperclip"></i> '; -- GitLab