Merge branch 'master' of git.freeside.biz:/home/git/freeside
[freeside.git] / rt / etc / upgrade / 4.2.10 / content
1 use strict;
2 use warnings;
3
4 our @Initial = (
5     sub {
6         my $attrs = RT::Attributes->new(RT->SystemUser);
7         $attrs->Limit( FIELD => 'Name', VALUE => 'SavedSearch' );
8         while ( my $attr = $attrs->Next ) {
9             my $content = $attr->Content;
10             if ( $content->{ChartStyle} && $content->{ChartStyle} =~ /^(?:pie|bar)$/ ) {
11                 $content->{ChartStyle} .= '+table+sql';
12                 my ($ret, $msg) = $attr->SetContent($content);
13                 unless ( $ret ) {
14                     RT->Logger->error("Failed to update ChartStyle for SavedSearch #" . $attr->id . ": $msg");
15                 }
16             }
17         }
18     },
19 );