- 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 };
+ my %has = ();
+ foreach my $next ( $lifecycle->Transitions( $current ) ) {
+ my $check = $lifecycle->CheckRight( $current => $next );
+ $has{ $check } = $Object->CurrentUserHasRight( $check )
+ unless exists $has{ $check };
+ push @status, $next if $has{ $check };
+ }
+ $statuses_by_lifecycle{$lifecycle->Name} = \@status;
+ } else {
+ $statuses_by_lifecycle{$lifecycle->Name} = [ $lifecycle->Transitions('') ];
+ }