Putting 4.2.0 on top of 4.0.17
[usit-rt.git] / etc / upgrade / 3.7.86 / content
CommitLineData
af59614d
MKG
1use strict;
2use warnings;
3
4our @Final = (
01e3b242 5 sub {
af59614d 6 RT->Logger->debug("Adding search for bookmarked tickets to defaults");
01e3b242
MKG
7 my $sys = RT::System->new(RT->SystemUser);
8
9 my $attrs = RT::Attributes->new( RT->SystemUser );
10 $attrs->LimitToObject( $sys );
11 my ($attr) = $attrs->Named( 'HomepageSettings' );
12 unless ($attr) {
af59614d 13 RT->Logger->error("You have no global home page settings");
01e3b242
MKG
14 return;
15 }
16 my $content = $attr->Content;
17 unshift @{ $content->{'body'} ||= [] },
18 { type => 'system', name => 'Bookmarked Tickets' };
19
20 my ($status, $msg) = $attr->SetContent( $content );
af59614d 21 RT->Logger->error($msg) unless $status;
01e3b242 22
af59614d 23 RT->Logger->debug("done.");
01e3b242
MKG
24 return 1;
25 },
26);