Merge branch 'master' of git.uio.no:usit-rt
[usit-rt.git] / etc / upgrade / 3.8.0 / content
CommitLineData
af59614d
MKG
1use strict;
2use warnings;
3
4our @Final = (
01e3b242
MKG
5 # by incident we've changed 'My Bookmarks' to 'Bookmarked Tickets' when
6 # 3.7.82 upgrade script still was creating 'My Bookmarks', try to fix it
7 sub {
af59614d 8 RT->Logger->debug("Going to rename 'My Bookmarks' to 'Bookmarked Tickets'");
01e3b242
MKG
9 my $sys = RT::System->new(RT->SystemUser);
10
11 my $attrs = RT::Attributes->new( RT->SystemUser );
12 $attrs->LimitToObject( $sys );
13 my ($attr) = $attrs->Named( 'Search - My Bookmarks' );
14 unless ($attr) {
af59614d 15 RT->Logger->debug("You have no global search 'My Bookmarks'. Skipped.");
01e3b242
MKG
16 return 1;
17 }
18 my ($status, $msg) = $attr->SetName( 'Search - Bookmarked Tickets' );
af59614d 19 RT->Logger->error($msg) and return undef unless $status;
01e3b242 20
af59614d 21 RT->Logger->debug("Renamed.");
01e3b242
MKG
22 return 1;
23 },
24);
25