]>
Commit | Line | Data |
---|---|---|
af59614d MKG |
1 | use strict; |
2 | use warnings; | |
3 | ||
4 | our @Final = ( | |
01e3b242 | 5 | sub { |
af59614d | 6 | RT->Logger->debug("Going to adjust 'Bookmarked Tickets'"); |
01e3b242 MKG |
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) { | |
af59614d | 13 | RT->Logger->debug("You have no global search 'Bookmarked Tickets'. Skipped."); |
01e3b242 MKG |
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 ); | |
af59614d | 20 | RT->Logger->error($msg) and return undef unless $status; |
01e3b242 | 21 | |
af59614d | 22 | RT->Logger->debug("Fixed."); |
01e3b242 MKG |
23 | return 1; |
24 | }, | |
25 | ); | |
26 | ||
27 |