[rt-users] Statistics: 0.1.1

Gerwin van de Steeg gerwin at endace.com
Wed Mar 30 22:09:33 EST 2005


Query,

I've got a report for statistics which generates a yearly report of
tickets, ordered by month and status.

Can i specify multiple LimitTransactionDate entries on a query.

ie.

my $tix = new RT::Tickers($session('CurrentUser'));
$tix->LimitQueue (VALUE => $queue);
$tix->LimitTransactionDate (OPERATOR => '>', VALUE => '20040101000000');
$tix->LimitTransactionDate (OPERATOR => '<', VALUE => '20050101000000');
$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.

or is there a more accurate, elegant way of doing this.



Gerwin van de Steeg

-------------- 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/20050331/10e39f33/attachment.sig>


More information about the rt-users mailing list