[prev in list] [next in list] [prev in thread] [next in thread]
List: rt-devel
Subject: Re: [rt-devel] Moving tickets from many queues to one
From: Bruce Campbell <bruce_campbell () ripe ! net>
Date: 2002-08-16 6:31:48
[Download RAW message or body]
On Thu, 15 Aug 2002, Grant Miller wrote:
> I'm trying to write up a Perl script to move all tickets from a group of
> queues into one larger queue. I'm having some difficulty figuring out
> how to get a list of tickets in a queue. This seems so basic, maybe I'm
> thinking too hard about it.
For examples and whatnot, have a look at the cli 'rt' thats comes with RT.
> my $sourcequeue = RT::Queue->new($RT::SystemUser);
> $sourcequeue->Load($smallqueue);
>
> # my $Tickets = RT::Tickets->new($RT::SystemUser);
$Tickets->UnLimit();
$Tickets->LimitQueue( VALUE => $sourcequeue->Name,
OPERATOR => '=' );
while( my $ticket = $Tickets->Next() ){
> # $ticket->SetQueue($destqueue->id);
> # }
>
> }
--
Bruce Campbell RIPE
Systems/Network Engineer NCC
www.ripe.net - PGP562C8B1B Operations/Security
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic