+<%INIT>
+### XXX: no cover for Tools/MyDay.html
+
+
+my @status;
+if ( @Statuses ) {
+ @status = @Statuses;
+}
+elsif ( $TicketObj ) {
+ my $current = $TicketObj->Status;
+ my $lifecycle = $TicketObj->QueueObj->Lifecycle;
+
+ my %has = ();
+ foreach my $next ( $lifecycle->Transitions( $current ) ) {
+ my $check = $lifecycle->CheckRight( $current => $next );
+ $has{ $check } = $TicketObj->CurrentUserHasRight( $check )
+ unless exists $has{ $check };
+ push @status, $next if $has{ $check };
+ }
+}
+elsif ( $QueueObj ) {
+ @status = $QueueObj->Lifecycle->Transitions('');
+}
+else {
+ @status = RT::Queue->Lifecycle->Valid;
+}
+</%INIT>