%# "My doctor told me to stop having intimate dinners for four. Unless %# there are three other people." %# -- Orson Welles <& /Edit/Elements/PopHeader, Title => loc('Link a Queue'), BG => '#C0EBEB', Action => 'Select.html' &>
<&|/l&>Select a queue to link to
<&|/l&>Ticket Type
<& /Edit/Elements/PopFooter &> <%INIT> if ($Queue) { my $QueueObj = RT::Queue->new($session{'CurrentUser'}); $QueueObj->Load($Queue); $m->comp('SelectReturn', QueueObj => $QueueObj); $m->abort; } my %Categories; my $Queues = RT::Queues->new($session{'CurrentUser'}); $Queues->OrderBy(FIELD => 'Name'); $Queues->UnLimit; my $List = []; while (my $queue = $Queues->Next) { my $descr = $queue->Description; $Categories{$descr}++ if length $descr; next if length $Category and $descr ne $Category; push @$List, $queue; } <%ARGS> $Category => '' $Begin => 0 $Queue => undef