diff options
Diffstat (limited to 'rt/share/html/Elements/SelectStatus')
-rwxr-xr-x | rt/share/html/Elements/SelectStatus | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/rt/share/html/Elements/SelectStatus b/rt/share/html/Elements/SelectStatus index e571baf63..af1ff615f 100755 --- a/rt/share/html/Elements/SelectStatus +++ b/rt/share/html/Elements/SelectStatus @@ -66,6 +66,8 @@ if ( @Statuses ) { } elsif ( $TicketObj ) { my $current = $TicketObj->Status; + push @status, $current; + my $lifecycle = $TicketObj->QueueObj->Lifecycle; my %has = (); @@ -78,8 +80,15 @@ elsif ( $TicketObj ) { } elsif ( $QueueObj ) { @status = $QueueObj->Lifecycle->Transitions(''); -} -else { +} elsif ( %Queues ) { + for my $id (keys %Queues) { + my $queue = RT::Queue->new($session{'CurrentUser'}); + $queue->Load($id); + push @status, $queue->Lifecycle->Valid if $queue->id; + } + my %seen; + @status = grep { not $seen{$_}++ } @status; +} else { @status = RT::Queue->Lifecycle->Valid; } </%INIT> @@ -89,6 +98,7 @@ $Name => undef @Statuses => () $TicketObj => undef $QueueObj => undef +%Queues => () $Default => '' $SkipDeleted => 0 |