diff options
author | Mark Wells <mark@freeside.biz> | 2016-06-11 23:19:11 -0700 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2016-06-13 13:31:13 -0700 |
commit | 93e64d8dec78c90f4a65249f5294c736b6129a9c (patch) | |
tree | 937da7866957cf13d512af94cfb99099befbc0bd /rt/share/html | |
parent | 9ff504a21d361a27997e94e74908ab663a57f207 (diff) |
show unreplied ticket marker in queue summary, #41670
Diffstat (limited to 'rt/share/html')
-rw-r--r-- | rt/share/html/Elements/QueueSummaryByLifecycle | 24 | ||||
-rw-r--r-- | rt/share/html/NoAuth/css/freeside3/ticket-lists.css | 2 |
2 files changed, 24 insertions, 2 deletions
diff --git a/rt/share/html/Elements/QueueSummaryByLifecycle b/rt/share/html/Elements/QueueSummaryByLifecycle index da31ebb59..6c45cfdea 100644 --- a/rt/share/html/Elements/QueueSummaryByLifecycle +++ b/rt/share/html/Elements/QueueSummaryByLifecycle @@ -66,9 +66,13 @@ for my $queue (@queues) { next if lc($queue->{Lifecycle} || '') ne lc $lifecycle->Name; $i++; + + my $classes = $i%2 ? 'oddline' : 'evenline'; + $classes .= ' unreplied-ticket' if $queue->{Unreplied} > 0; </%PERL> -<tr class="<% $i%2 ? 'oddline' : 'evenline'%>" > +<tr class="<% $classes %>"> +<td></td> <td> <a href="<% $link_all->($queue, \@cur_statuses) %>" title="<% $queue->{Description} %>"><% $queue->{Name} %></a> </td> @@ -131,6 +135,24 @@ for my $queue (@queues) { $lifecycle{ lc $cycle->Name } = $cycle; } +use RT::Search::UnrepliedTickets; +my $Tickets = RT::Tickets->new( RT->SystemUser ); +my $Search = RT::Search::UnrepliedTickets->new( TicketsObj => $Tickets ); +$Search->Prepare; + +for my $queue (@queues) { + my $cycle = RT::Lifecycle->Load( Name => $queue->{'Lifecycle'} ); + $lifecycle{ lc $cycle->Name } = $cycle; + + # show whether there are unreplied tickets + # somewhat inefficient but we only use the count query + my $tix = $Tickets->Clone; + $tix->Limit(FIELD => 'Queue', + OPERATOR => '=', + VALUE => $queue->{id}); + $queue->{Unreplied} = $tix->Count; +} + unless (@statuses) { my %seen; foreach my $set ( 'initial', 'active' ) { diff --git a/rt/share/html/NoAuth/css/freeside3/ticket-lists.css b/rt/share/html/NoAuth/css/freeside3/ticket-lists.css index 257cf3b07..efcc2c889 100644 --- a/rt/share/html/NoAuth/css/freeside3/ticket-lists.css +++ b/rt/share/html/NoAuth/css/freeside3/ticket-lists.css @@ -108,7 +108,7 @@ tr.unreplied-ticket > :first-child::before { width: 1ex; float: left; content: ''; - margin-top: 1ex; + margin-right: 1ex; background-color: green; } |