Putting 4.2.0 on top of 4.0.17
[usit-rt.git] / etc / upgrade / 4.0.0rc7 / content
CommitLineData
af59614d
MKG
1use strict;
2use warnings;
3
4our @Initial = (
01e3b242 5 sub {
af59614d 6 RT->Logger->debug("Going to set lifecycle for approvals");
01e3b242
MKG
7
8 my $queue = RT::Queue->new( RT->SystemUser );
9 $queue->Load('___Approvals');
10 unless ( $queue->id ) {
af59614d 11 RT->Logger->warning("There is no ___Approvals queue in the DB");
01e3b242
MKG
12 return 1;
13 }
14
af59614d 15 return 1 if $queue->Lifecycle && $queue->Lifecycle eq 'approvals';
01e3b242
MKG
16
17 my ($status, $msg) = $queue->SetLifecycle('approvals');
18 unless ( $status ) {
af59614d 19 RT->Logger->error("Couldn't set lifecycle for '___Approvals' queue: $msg");
01e3b242
MKG
20 return 0;
21 }
22 return 1;
23 },
24);