Putting 4.2.0 on top of 4.0.17
[usit-rt.git] / etc / upgrade / 3.7.86 / content
... / ...
CommitLineData
1use strict;
2use warnings;
3
4our @Final = (
5 sub {
6 RT->Logger->debug("Adding search for bookmarked tickets to defaults");
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) {
13 RT->Logger->error("You have no global home page settings");
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 );
21 RT->Logger->error($msg) unless $status;
22
23 RT->Logger->debug("done.");
24 return 1;
25 },
26);