[rt-users] Statistics: 0.1.1
Gerwin van de Steeg
gerwin at endace.com
Tue Apr 5 23:32:52 EDT 2005
On Thu, 2005-03-31 at 15:09 +1200, Gerwin van de Steeg wrote:
> Query,
>
> I've got a report for statistics which generates a yearly report of
> tickets, ordered by month and status.
>
ie. (updated with 2005-2006 data)
my $tix = new RT::Tickers($session('CurrentUser'));
$tix->LimitQueue (VALUE => $queue);
$tix->LimitTransactionDate (OPERATOR => '>', VALUE => '20050101000000');
$tix->LimitTransactionDate (OPERATOR => '<', VALUE => '20060101000000');
$tix->UnLimit;
if ($tix->Count) {
while (my $t = $tix->RT::SearchBuilder::Next) {
$counts[(localtime($t->ResolvedObj->Unix))[4]](resolved)++
if $t->Status eq "resolved";
$counts[(localtime($t->LastUpdatedObj->Unix))[4]](deleted)++
if $t->Status eq "deleted";
$counts[(localtime($t->CreatedObj->Unix))[4]](created)++
)
)
>
>
> This seems to work, however if I do this for 2005-2006 then I'm getting
> incorrect values, in months which have not yet passed.
>
The graph basically contains the following values for 2005 (i've only
listed months that haven't been yet)
Month Qty
May 2
Jun 1
Jul
Aug 1
Sep 1
Oct 7
Nov 5
Dec 11
-Gerwin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20050406/0930cce9/attachment.sig>
More information about the rt-users
mailing list