[rt-users] Report for original queue count

Kevin Falcone falcone at bestpractical.com
Thu Jan 22 16:34:50 EST 2015


On Thu, Jan 22, 2015 at 11:25:28AM +0100, Vegard Vesterheim wrote:
> my $ticket = RT::Ticket->new($user);
> while (my $t = $objs->Next) {
>     $ticket->Load ($t->ObjectId);
> }

You may appreciate my $ticket = $t->Object as a shortcut

> This is a sledgehammer approach, I know. If you have a many
> tickets/transactions, the query could take a long time. 

You may benefit from additional indexes, if this is something you do
frequently (or the database slow query logs tell you when you hit
that).

> In my case I want to restrict the search to a given timeperiod, aka: "How
> many tickets where moved out of queue <foo> yesterday")

It wasn't clear from your code if you know how to do that in the
query, or if you're just stopping the iteration when you get far
enough back.

-kevin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 221 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20150122/50735c27/attachment.sig>


More information about the rt-users mailing list