RT 4.2.11, ticket#13852
[freeside.git] / rt / etc / upgrade / 3.8.1 / content
1 use strict;
2 use warnings;
3
4 our @Final = (
5     sub {
6         RT->Logger->debug("Going to adjust 'Bookmarked Tickets'");
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( 'Search - Bookmarked Tickets' );
12         unless ($attr) {
13             RT->Logger->debug("You have no global search 'Bookmarked Tickets'. Skipped.");
14             return 1;
15         }
16         my $props = $attr->Content;
17         $props->{'Query'} =~ s/__Bookmarks__/id = '__Bookmarked__'/g;
18
19         my ($status, $msg) = $attr->SetContent( $props );
20         RT->Logger->error($msg) and return undef unless $status;
21
22         RT->Logger->debug("Fixed.");
23         return 1;
24     },
25 );
26
27