diff options
Diffstat (limited to 'rt/etc/upgrade/4.0.0rc7/content')
-rw-r--r-- | rt/etc/upgrade/4.0.0rc7/content | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/rt/etc/upgrade/4.0.0rc7/content b/rt/etc/upgrade/4.0.0rc7/content index d0d210b7b..4fd63e71c 100644 --- a/rt/etc/upgrade/4.0.0rc7/content +++ b/rt/etc/upgrade/4.0.0rc7/content @@ -1,19 +1,22 @@ -@Initial = ( +use strict; +use warnings; + +our @Initial = ( sub { - $RT::Logger->debug("Going to set lifecycle for approvals"); + RT->Logger->debug("Going to set lifecycle for approvals"); my $queue = RT::Queue->new( RT->SystemUser ); $queue->Load('___Approvals'); unless ( $queue->id ) { - $RT::Logger->warning("There is no ___Approvals queue in the DB"); + RT->Logger->warning("There is no ___Approvals queue in the DB"); return 1; } - return 1 if $queue->Lifecycle->Name eq 'approvals'; + return 1 if $queue->Lifecycle && $queue->Lifecycle eq 'approvals'; my ($status, $msg) = $queue->SetLifecycle('approvals'); unless ( $status ) { - $RT::Logger->error("Couldn't set lifecycle for '___Approvals' queue: $msg"); + RT->Logger->error("Couldn't set lifecycle for '___Approvals' queue: $msg"); return 0; } return 1; |