Due to a request by my boss, I made a minor change the the Quicksearch
element to include a line for queue totals. It shows the total number of
tickets that are new and open in all the queues.
Ex:
Queue New Open
Support 5 10
IT 3 5
ALL 8 15
Here is the diff -c if anybody wants it:
*** …/…/…/share/html/Elements/Quicksearch Wed May 7 09:18:40 2003
— Quicksearch Thu May 8 12:15:24 2003
*** 32,56 ****
<%PERL>
my $i;
while (my $queue = $Queues->Next) {
$Tickets->ClearRestrictions;
$Tickets->LimitStatus(VALUE => “open”);
$Tickets->LimitQueue(VALUE => $queue->Name, OPERATOR =>
’=’);
my $open = $Tickets->Count();
$Tickets->ClearRestrictions;
$Tickets->LimitStatus(VALUE => "new");
$Tickets->LimitQueue(VALUE => $queue->Name, OPERATOR =>
‘=’);
my $new = $Tickets->Count();
</%PERL>
%
$i++;
!
— 32,65 ----
<%PERL>
my $i;
- my ($total_open,$total_new);
while (my $queue = $Queues->Next) {
$Tickets->ClearRestrictions;
$Tickets->LimitStatus(VALUE => “open”);
$Tickets->LimitQueue(VALUE => $queue->Name, OPERATOR =>
’=’);
my $open = $Tickets->Count(); -
$total_open += $open; $Tickets->ClearRestrictions; $Tickets->LimitStatus(VALUE => "new"); $Tickets->LimitQueue(VALUE => $queue->Name, OPERATOR =>
‘=’);
my $new = $Tickets->Count();
-
$total_new += $new;
</%PERL>
% $i++;
!<%$new%> <%$open%> + <& /Elements/TitleBoxEnd &>ALL +<%$total_new%> +<%$total_open%> +