summaryrefslogtreecommitdiff
path: root/rt/etc/upgrade/4.2.10/content
blob: d9aadccd5ae5158e9c9176ca426c078d9ab5273f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use strict;
use warnings;

our @Initial = (
    sub {
        my $attrs = RT::Attributes->new(RT->SystemUser);
        $attrs->Limit( FIELD => 'Name', VALUE => 'SavedSearch' );
        while ( my $attr = $attrs->Next ) {
            my $content = $attr->Content;
            if ( $content->{ChartStyle} && $content->{ChartStyle} =~ /^(?:pie|bar)$/ ) {
                $content->{ChartStyle} .= '+table+sql';
                my ($ret, $msg) = $attr->SetContent($content);
                unless ( $ret ) {
                    RT->Logger->error("Failed to update ChartStyle for SavedSearch #" . $attr->id . ": $msg");
                }
            }
        }
    },
);