[Rt-commit] r13090 - rt/branches/3.8-TESTING/etc/upgrade/3.7.86

ruz at bestpractical.com ruz at bestpractical.com
Mon Jun 9 18:17:53 EDT 2008


Author: ruz
Date: Mon Jun  9 18:17:53 2008
New Revision: 13090

Added:
   rt/branches/3.8-TESTING/etc/upgrade/3.7.86/
   rt/branches/3.8-TESTING/etc/upgrade/3.7.86/content

Log:
* add 'Bookmarked tickets' to default homepage, so all
  people system defaults will see it after upgrade

Added: rt/branches/3.8-TESTING/etc/upgrade/3.7.86/content
==============================================================================
--- (empty file)
+++ rt/branches/3.8-TESTING/etc/upgrade/3.7.86/content	Mon Jun  9 18:17:53 2008
@@ -0,0 +1,23 @@
+ at Final = (
+    sub {
+        $RT::Logger->debug("Adding search for bookmarked tickets to defaults");
+        my $sys = RT::System->new($RT::SystemUser);
+
+        my $attrs = RT::Attributes->new( $RT::SystemUser );
+        $attrs->LimitToObject( $sys );
+        my ($attr) = $attrs->Named( 'HomepageSettings' );
+        unless ($attr) {
+            $RT::Logger->error("You have no global home page settings");
+            return;
+        }
+        my $content = $attr->Content;
+        unshift @{ $content->{'body'} ||= [] },
+            { type => 'system', name => 'Bookmarked Tickets' };
+
+        my ($status, $msg) = $attr->SetContent( $content );
+        $RT::Logger->error($msg) unless $status;
+
+        $RT::Logger->debug("done.");
+        return 1;
+    },
+);


More information about the Rt-commit mailing list