]>
Commit | Line | Data |
---|---|---|
01e3b242 MKG |
1 | @Final = ( |
2 | sub { | |
3 | $RT::Logger->debug("Going to adjust 'Bookmarked Tickets'"); | |
4 | my $sys = RT::System->new(RT->SystemUser); | |
5 | ||
6 | my $attrs = RT::Attributes->new( RT->SystemUser ); | |
7 | $attrs->LimitToObject( $sys ); | |
8 | my ($attr) = $attrs->Named( 'Search - Bookmarked Tickets' ); | |
9 | unless ($attr) { | |
10 | $RT::Logger->debug("You have no global search 'Bookmarked Tickets'. Skipped."); | |
11 | return 1; | |
12 | } | |
13 | my $props = $attr->Content; | |
14 | $props->{'Query'} =~ s/__Bookmarks__/id = '__Bookmarked__'/g; | |
15 | ||
16 | my ($status, $msg) = $attr->SetContent( $props ); | |
17 | $RT::Logger->error($msg) and return undef unless $status; | |
18 | ||
19 | $RT::Logger->debug("Fixed."); | |
20 | return 1; | |
21 | }, | |
22 | ); | |
23 | ||
24 |