RT 4.2.11, ticket#13852
[freeside.git] / rt / etc / upgrade / 4.2.10 / content
diff --git a/rt/etc/upgrade/4.2.10/content b/rt/etc/upgrade/4.2.10/content
new file mode 100644 (file)
index 0000000..d9aadcc
--- /dev/null
@@ -0,0 +1,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");
+                }
+            }
+        }
+    },
+);