& /Elements/Header, Title => loc('New, Open and Stalled tickets by Queue') &> <& /RTx/Statistics/Elements/Tabs, Title => loc('New, Open and Stalled tickets by Queue') &>
The purpose of this page is to show a snapshot of the current status of tickets by Queue. You can multi select Queues from the dropdown list or simply show all available queues. This will indicate how many tickets have not yet been viewed (New), how many have been at least viewed once (Open) and how many have had their status changed to stalled.
% Statistics::DebugInit( $m ); <%ARGS> @queues => @Statistics::OpenStalledQueueList $AllowSorting => undef $Order => undef $OrderBy => undef $ShowNavigation => 1 $ShowHeader => 1 $Rows => 50 $Page => 1 $BaseURL => undef $AddAllCheck => undef %ARGS> <%INIT> use RTx::Statistics; my $n = 0; my @data; my @msgs; my %totals; my $QueryString; my %queues_to_show; my $maxitems; my $RowFormat; my $BoldRowFormat; my %record; my %values; my $record = \%record; $record{values} = \%values; Statistics::DebugClear(); # Handle the Add All Checkbox if($AddAllCheck eq "on") { $AddAllCheck = undef; undef (@queues); my $q=new RT::Queues($session{'CurrentUser'}); $q->UnLimit; while (my $queue=$q->Next) { next if !$queue->CurrentUserHasRight('SeeQueue'); push @queues, $queue->Name; } } # If the user has the right to see the queue, put it into the map for my $q (@queues) { my $Queueobj = new RT::Queue($session{'CurrentUser'}); $Queueobj->Load($q); next if !$Queueobj->CurrentUserHasRight('SeeQueue'); $queues_to_show{$q} = 1; } $maxitems = (scalar @queues) + 2; # Build the new query string $QueryString = "queues=" . join("&queues=", @queues); # Build the format strings $RowFormat = "'__Statistics_Status__'"; $BoldRowFormat = "'__Statistics_Status__'"; for my $q (@queues) { $RowFormat .= ",'__Statistics_Dynamic__/KEY:$q/TITLE:$q/STYLE:text-align:right;'"; $BoldRowFormat .= ",'__Statistics_Dynamic__/KEY:$q/TITLE:$q/STYLE:text-align:right;'"; } $RowFormat .= ",'__Statistics_Totals__/STYLE:text-align:right;'"; $BoldRowFormat .= ",'__Statistics_Totals__/STYLE:text-align:right;'"; # Parse the formats into structures. my (@RowFormat) = $m->comp('/RTx/Statistics/Elements/CollectionAsTable/ParseFormat', Format => $RowFormat); my (@BoldRowFormat) = $m->comp('/RTx/Statistics/Elements/CollectionAsTable/ParseFormat', Format => $BoldRowFormat); my $queue = new RT::Queues($session{CurrentUser}); $queue->UnLimit; my $QueueObj = new RT::Queue($session{'CurrentUser'}); $QueueObj->Load($queue); %INIT>