X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fhtml%2FRTx%2FStatistics%2FDayOfWeek%2Findex.html;fp=rt%2Fhtml%2FRTx%2FStatistics%2FDayOfWeek%2Findex.html;h=0000000000000000000000000000000000000000;hb=e16a0b663d39225ec9caaa39e8531d7346639016;hp=2e82b9c240ef80de0032037870648269a66d821c;hpb=ef519f3acaf6a360ed613539f71850de390b7926;p=freeside.git diff --git a/rt/html/RTx/Statistics/DayOfWeek/index.html b/rt/html/RTx/Statistics/DayOfWeek/index.html deleted file mode 100755 index 2e82b9c24..000000000 --- a/rt/html/RTx/Statistics/DayOfWeek/index.html +++ /dev/null @@ -1,155 +0,0 @@ -<& /Elements/Header, Title =>loc('Tickets by Day Of Week in Queue:' . $QueueObj->Name()) &> -<& /RTx/Statistics/Elements/Tabs, Title =>loc('Trends in ticket status by Day Of Week in Queue:' . $QueueObj->Name()) &> - -
The purpose of this page is to show historical trends for each day of the week. -It displays details of number of tickets created in your -selected queue for each day. It also hows how many of those created tickets were Resolved or Deleted
- - - -% Statistics::DebugInit( $m ); - -<%ARGS> -$Queue => $Statistics::DayOfWeekQueue - -$AllowSorting => undef -$Order => undef -$OrderBy => undef -$ShowNavigation => 1 -$ShowHeader => 1 -$Rows => 50 -$Page => 1 -$BaseURL => undef -%ARGS> - -<%INIT> -use GD::Graph; -use RTx::Statistics; -my @days = qw(Sun Mon Tue Wed Thu Fri Sat); -my $n = 0; -my @data = ([]); -my @msgs; -my @counts; -my %Totals = ( - resolved => 0, - deleted => 0, - new => 0 -); -my $QueryString = "Queue=$Queue"; -my $maxitems = 4; -my %record; -my %values; -my $record = \%record; - -$record{values} = \%values; - -my $Format = qq{ Statistics_Date, - '__Statistics_Created_Count__/STYLE:text-align:right;', - '__Statistics_Resolved_Count__/STYLE:text-align:right;', - '__Statistics_Deleted_Count__/STYLE:text-align:right;' }; -my $BoldFormat = qq{ '__Statistics_Date__', - '__Statistics_Created_Count__/STYLE:text-align:right;', - '__Statistics_Resolved_Count__/STYLE:text-align:right;', - '__Statistics_Deleted_Count__/STYLE:text-align:right;' }; -my (@Format) = $m->comp('/RTx/Statistics/Elements/CollectionAsTable/ParseFormat', Format => $Format); -my (@BoldFormat) = $m->comp('/RTx/Statistics/Elements/CollectionAsTable/ParseFormat', Format => $BoldFormat); - -my $QueueObj = new RT::Queue($session{'CurrentUser'}); -$QueueObj->Load($Queue); -$RT::Logger->warning("Loaded queue $Queue, name=". $QueueObj->Name()); - -my $tix = new RT::Tickets($session{'CurrentUser'}); -$tix->LimitQueue (VALUE => $Queue); -$tix->UnLimit; -if ($tix->Count) { - # Initialize the counters to zero, so that all the cells show up - foreach my $day (0..@days) { - $counts[$day]{resolved} = 0; - $counts[$day]{deleted} = 0; - $counts[$day]{new} = 0; - } - while (my $t = $tix->RT::SearchBuilder::Next) { # BLOODY HACK - if($t->Status eq "resolved") { - $counts[(localtime($t->ResolvedObj->Unix))[6]]{resolved}++; - $Totals{resolved}++; - } - if($t->Status eq "deleted") { - $counts[(localtime($t->LastUpdatedObj->Unix))[6]]{deleted}++; - $Totals{deleted}++; - } - $counts[(localtime($t->CreatedObj->Unix))[6]]{new}++; - $Totals{new}++; - } -} -%INIT>