& /Admin/Elements/Header, title => 'Modify a queue' &> <& /Admin/Elements/QueueTabs, id => $QueueObj->id &> <& /Elements/ListActions, actions => \@results &> <& /Elements/TitleBoxStart, title => $title &>
<%INIT> use RT::Interface::Web; my $QueueObj = new RT::Queue($session{'CurrentUser'}); my $title; if ($Create) { $title = "Create a queue"; } else { if ($id eq 'new') { $QueueObj->Create(QueueId => $QueueId); } else { $QueueObj->Load($id) || $QueueObj->Load($QueueId) || Abort("Couldn't load queue '$QueueId'"); } $title = 'Editing Configuration for queue '.$QueueObj->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; } %INIT> <%ARGS> $id => undef $result => undef @results => undef $QueueId => undef $Create => undef $Description => undef $CorrespondAddress => undef $CommentAddress => undef $InitialPriority => undef $FinalPriority => undef $DefaultDueIn => undef %ARGS>