Merge branch 'master' of git.freeside.biz:/home/git/freeside
[freeside.git] / rt / etc / upgrade / 3.8.0 / content
1 use strict;
2 use warnings;
3
4 our @Final = (
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 {
8         RT->Logger->debug("Going to rename 'My Bookmarks' to 'Bookmarked Tickets'");
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) {
15             RT->Logger->debug("You have no global search 'My Bookmarks'. Skipped.");
16             return 1;
17         }
18         my ($status, $msg) = $attr->SetName( 'Search - Bookmarked Tickets' );
19         RT->Logger->error($msg) and return undef unless $status;
20
21         RT->Logger->debug("Renamed.");
22         return 1;
23     },
24 );
25