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