blob: d44c996fa493ea067580ce1c61933d6e2084a6e5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
<& /Elements/TitleBoxStart, title => "Find new/open tickets", titleright => "<A class='inverse' href=\"$RT::WebPath/Search/Listing.html?NewSearch=1\">Advanced Search</A>" &>
<TABLE BORDER=0 cellspacing=0 cellpadding=1 WIDTH=100%>
<tr>
<th align=left>Queue</th>
<th align=left><font size=-1>New</font></th>
<th align=left><font size=-1>Open</font></th>
<th align=left><font size=-1>Stalled</font></th>
</tr>
<%PERL>
while (my $queue = $Queues->Next) {
$Tickets->ClearRestrictions;
$Tickets->LimitStatus(VALUE => "open");
$Tickets->LimitQueue(VALUE => $queue->id, OPERATOR => '=');
my $open = $Tickets->Count();
$Tickets->ClearRestrictions;
$Tickets->LimitStatus(VALUE => "new");
$Tickets->LimitQueue(VALUE => $queue->id, OPERATOR => '=');
my $new = $Tickets->Count();
$Tickets->ClearRestrictions;
$Tickets->LimitStatus(VALUE => "stalled");
$Tickets->LimitQueue(VALUE => $queue->id, OPERATOR => '=');
my $stalled = $Tickets->Count();
</%PERL>
<TR><TD><A HREF="<% $RT::WebPath%>/Search/Listing.html?ValueOfStatus=open&ValueOfStatus=new&StatusOp=%3D&QueueOp=%3D&ValueOfQueue=<%$queue->Id%>&RowsPerPage=50&NewSearch=1"><%$queue->Name%></a></TD>
<TD><%$new%></TD>
<TD><%$open%></TD>
<TD><%$stalled%></TD>
</TR>
% }
</TABLE>
<& /Elements/TitleBoxEnd &>
<%INIT>
my $Queues = new RT::Queues($session{'CurrentUser'});
$Queues->UnLimit();
my $Tickets = new RT::Tickets ($session{'CurrentUser'});
</%INIT>
|