[rt-users] Displaying Stalled Tickets

Stephen Dowdy sdowdy at ucar.edu
Tue Aug 16 17:06:37 EDT 2005


Tim Suter wrote:
> Any one have a quick and dirty for displaying stalled tickets under
> Quick Search?
> 
> Tim

Tim,

Here's what i do in rt3.4.0 for the local "QuickSearch" Element.

It also includes a lame hack to force a RED background for a quick visual 
highlight on any queue list (new,open,stalled) for having > 5 NEW or 
STALLED tickets or > 50 open tickets.  (these are hardcoded :-( ).


saw:Elements# diff /opt/rt3/share/html/Elements/Quicksearch Quicksearch
45a46,52
 > %#RAL BEGIN RAL TAGGED BLOCK }}}
 > %#RAL Modification:
 > %#RAL 11-Feb-2005 (sdowdy at ucar.edu)
 > %#RAL         Add in threshhold evaluation to set a background-color 
style of
 > %#RAL         RED on Queue New/Open/Stalled.  (todo: use per-queue
 > %#RAL         customfields for threshhold values?)
 > %#RAL END RAL TAGGED BLOCK }}}
52a60
 >        <th class="collection-as-table" 
align=right><&|/l&>Stall</&></th>
62c70,71
<         my $all_q = "Queue = '".$queue->Name."' AND (Status = 'open' OR 
Status = 'new')";
---
 >         my $stall_q = "Queue = '".$queue->Name."' AND Status = 'stalled'";
 >         my $all_q = "Queue = '".$queue->Name."' AND (Status = 'open' OR 
Status = 'new' OR Status = 'stalled')";
69a79,81
 >         $Tickets->FromSQL($stall_q);
 >      my $stall = $Tickets->Count();
 >
76,77c88,90
< <td align="right"><A HREF="<% 
$RT::WebPath%>/Search/Results.html?Query=<%$new_q%>&Rows=50"><%$new%></a></TD>
< <td align="right"><A HREF="<% 
$RT::WebPath%>/Search/Results.html?Query=<%$open_q%>&Rows=50"><%$open%></a></TD>
---
 > <td align="right" style="<% $new > 5 ? 'background-color: red' : '' 
%>"><A HREF="<% 
$RT::WebPath%>/Search/Results.html?Query=<%$new_q%>&Rows=50"><% $new 
%></a></TD>
 > <td align="right" style="<% $open > 50 ? 'background-color: red' : '' 
%>" ><A HREF="<% 
$RT::WebPath%>/Search/Results.html?Query=<%$open_q%>&Rows=50"><% $open 
%></a></TD>
 > <td align="right" style="<% $stall > 5 ? 'background-color: red' : '' 
%>" ><A HREF="<% 
$RT::WebPath%>/Search/Results.html?Query=<%$stall_q%>&Rows=50"><% $stall 
%></a></TD>

--stephen
-- 
Stephen Dowdy  -  Systems Administrator  -  NCAR/RAP
303.497.2869  -  sdowdy at ucar.edu  -  http://www.rap.ucar.edu/~sdowdy/




More information about the rt-users mailing list