[Rt-commit] r19403 - in rt/3.8/trunk: etc/upgrade/3.8.3

falcone at bestpractical.com falcone at bestpractical.com
Fri May 1 16:43:09 EDT 2009


Author: falcone
Date: Fri May  1 16:43:06 2009
New Revision: 19403

Modified:
   rt/3.8/trunk/   (props changed)
   rt/3.8/trunk/etc/upgrade/3.8.3/content

Log:
 r47150 at ketch:  falcone | 2009-05-01 16:42:24 -0400
 RT-Ticket: 13261
 RT-Action: Correspond
 RT-Status: Resolved 
 
 * detect if you're missing ExtractSubjectTag actions/scrip and add them
   They were missing from the 3.8.0 upgrade scrips, so if you upgraded
   from earlier RTs you won't have them


Modified: rt/3.8/trunk/etc/upgrade/3.8.3/content
==============================================================================
--- rt/3.8/trunk/etc/upgrade/3.8.3/content	(original)
+++ rt/3.8/trunk/etc/upgrade/3.8.3/content	Fri May  1 16:43:06 2009
@@ -56,4 +56,35 @@
 );
 
 
+{
+$RT::Logger->debug("Going to add in Extract Subject Tag actions if they were missed during a previous upgrade");
+
+$actions = RT::ScripActions->new( $RT::SystemUser );
+$actions->Limit(
+    FIELD => 'ExecModule',
+    VALUE => 'ExtractSubjectTag',
+);
+my $extract_action = $actions->First;
+
+if ( $extract_action && $extract_action->Id ) {
+    $RT::Logger->debug("You appear to already have an Extract Subject Tag action, skipping");
+} else {
+    $RT::Logger->debug("Didn't find an existing Extract Subject Tag action, adding it");
+    push @ScripActions, (
+            { Name        => 'Extract Subject Tag',                               # loc
+              Description => 'Extract tags from a Transaction\'s subject and add them to the Ticket\'s subject.', # loc
+              ExecModule  => 'ExtractSubjectTag' 
+            },
+    );
+
+    $RT::Logger->debug("Adding Extract Subject Tag Scrip");
+    push @Scrips, (
+        {  Description    => "On transaction, add any tags in the transaction's subject to the ticket's subject",
+           ScripCondition => 'On Transaction',
+           ScripAction    => 'Extract Subject Tag',
+           Template       => 'Blank' 
+        },
+    );
+}
+}
 


More information about the Rt-commit mailing list