[rt-devel] Moving tickets from many queues to one
Grant Miller
grant at pico.apple.com
Fri Aug 16 01:32:08 EDT 2002
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.
Anyways, here's what I have so far. The lines with a "#" in front is
my attempt to describe what I want to do. Maybe I'm thinking about this
backwards.
my $destqueue = RT::Queue->new($RT::SystemUser);
$destqueue->Load('bigqueue');
foreach $smallqueue (@smallqueues) {
my $sourcequeue = RT::Queue->new($RT::SystemUser);
$sourcequeue->Load($smallqueue);
# my $Tickets = RT::Tickets->new($RT::SystemUser);
# @tickets = $Tickets->ListAllInQueue($sourcequeue->id);
#
# foreach $ticket (@tickets) {
# $ticket->SetQueue($destqueue->id);
# }
}
Any help or pointers would be appreciated.
--
-Grant Miller grant at pico.apple.com
Unix Systems Admin, Engineering Computer Services, Apple Computer
More information about the Rt-devel
mailing list