[freeside-commits] freeside/rt/html/RTx/Statistics/UserTest index.html, NONE, 1.1.2.2
Ivan,,,
ivan at wavetail.420.am
Wed Jun 20 15:29:31 PDT 2007
Update of /home/cvs/cvsroot/freeside/rt/html/RTx/Statistics/UserTest
In directory wavetail:/tmp/cvs-serv10375/rt/html/RTx/Statistics/UserTest
Added Files:
Tag: FREESIDE_1_7_BRANCH
index.html
Log Message:
integrate RTx::Statistics, RT::Extension::ActivityReports package, and RTx::WebCronTool packages, as part of merging spiritone RT changes (#1661)
--- NEW FILE: index.html ---
<& /Elements/Header, Title => 'Time to Resolve in Queue' &>
<& /RTx/Statistics/Elements/Tabs, Title => 'Time to Resolve, by ticket in Queue:' . $QueueObj->Name() &>
<form method="POST">
See Queue:<BR>
<& /Elements/SelectQueue, Name=>"queue", Default => "$queue" &>
<BR>
<INPUT TYPE="submit" VALUE="Go!"</INPUT>
</form>
<BR>
% my $url = 'Elements/Chart?x_labels=';
% my $i;
% $url .= join ",", (map {(int($_/2) == $_/2 && (++$i)%2) ? $_/2 : ""} grep {$counts[$_]} 0..($#counts-1)), "longer";
% $url .= '&';
% $url .= "marker_size=1&";
% $url .= "data1=".(join ",", map { $_ || () } @counts)."&";
% chop $url;
<IMG SRC="<% $url %>">
<BR>
<%ARGS>
$queue => $Statistics::TimeToResolveGraphQueue;
</%ARGS>
<%INIT>
use RTx::Statistics;
my @days = qw(Sun Mon Tue Wed Thu Fri Sat);
my $n = 0;
my @data = ([]);
my @msgs;
my @counts;
my $QueueObj = new RT::Queue($session{'CurrentUser'});
$QueueObj->Load($queue);
my $tix = new RT::Tickets($session{'CurrentUser'});
$tix->LimitQueue (VALUE => $queue) if $queue;
$tix->LimitStatus(VALUE => "resolved");
$tix->UnLimit;
if ($tix->Count) {
while (my $t = $tix->RT::SearchBuilder::Next) { # BLOODY HACK
my $when = $t->ResolvedObj->Unix - $t->CreatedObj->Unix;
next unless $when > 0; # Doubly bloody hack
my $max = (60*60*24*2) / 1800;
my $x = int($when / 1800);
$counts[$x > $max ? $max : $x]++;
}
}
</%INIT>
More information about the freeside-commits
mailing list