X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FRTx%2FStatistics%2FOpenStalled%2Findex.html;fp=rt%2Fshare%2Fhtml%2FRTx%2FStatistics%2FOpenStalled%2Findex.html;h=d0cd9f158b78b50708dc0a6bb89af0dd5fbb06af;hb=8304b6b00f1be8d09c714b854e17960d225e0928;hp=0000000000000000000000000000000000000000;hpb=e16a0b663d39225ec9caaa39e8531d7346639016;p=freeside.git diff --git a/rt/share/html/RTx/Statistics/OpenStalled/index.html b/rt/share/html/RTx/Statistics/OpenStalled/index.html new file mode 100755 index 000000000..d0cd9f158 --- /dev/null +++ b/rt/share/html/RTx/Statistics/OpenStalled/index.html @@ -0,0 +1,188 @@ +<& /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>