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