<& /Admin/Elements/Header, Title => 'Modify a queue' &>

Modify a queue

<& /Elements/ListActions, actions => \@results &> <& /Admin/Elements/ModifyQueue, QueueObj => $QueueObj &> <%INIT> use RT::Interface::Web; my $QueueObj = new RT::Queue($session{'CurrentUser'}); $QueueObj->Load($id) || $QueueObj->Load($QueueId) || $m->comp('/Elements/Error', Why => "Couldn't load queue '$QueueId'"); my @fields = qw(Description CorrespondAddress CommentAddress QueueId InitialPriority FinalPriority DefaultDueIn); #Run through each field in this list. update the value if apropriate my $field; foreach $field (@fields) { my ($code, $msg); my $check = "if ((defined \$$field) and (\$$field !~ \$QueueObj->$field)) { (\$code, \$msg) = \$QueueObj->Set$field(\$$field); push \@results, \$msg; }"; eval $check; } <%ARGS> $id => undef $result => undef @results => undef $QueueId => undef $Description => undef $CorrespondAddress => undef $CommentAddress => undef $InitialPriority => undef $FinalPriority => undef $DefaultDueIn => undef