[rt-users] Statistics: 0.1.1

Gerwin van de Steeg gerwin at endace.com
Tue Apr 5 21:12:55 EDT 2005


On Thu, 2005-03-31 at 06:36 -0500, Todd Chapman wrote:
> On Thu, Mar 31, 2005 at 03:09:33PM +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.
> > 
> > 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.
> > 
> 
> Why are you call Limit and then calling UnLimit?
> 
> -Todd

From what I can gather, there seems to be no difference in the report
generated (I've tried with and without the UnLimit).


-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/f1293488/attachment.sig>


More information about the rt-users mailing list