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
pgpvsYcs_7_zH.pgp
Description: PGP signature
