[Rt-commit] rt branch, 4.2/upgrade-from-3.6-errors, created. rt-4.1.23-18-g1c2eef9
Alex Vandiver
alexmv at bestpractical.com
Thu Sep 5 13:36:20 EDT 2013
The branch, 4.2/upgrade-from-3.6-errors has been created
at 1c2eef928d9f662ff183f8e3f8b011e8d569e355 (commit)
- Log -----------------------------------------------------------------
commit 2662ace1caf164a7582e0c1039d4bee63730149d
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Thu Sep 5 13:31:31 2013 -0400
Oold searches over Scrips should not pull in the new Disabled column
diff --git a/etc/upgrade/3.7.19/content b/etc/upgrade/3.7.19/content
index a7b2539..a694562 100644
--- a/etc/upgrade/3.7.19/content
+++ b/etc/upgrade/3.7.19/content
@@ -5,6 +5,7 @@ our @Final = (
sub {
require RT::Scrips;
my $scrips = RT::Scrips->new( RT->SystemUser );
+ $scrips->{'with_disabled_column'} = 0;
$scrips->Limit( FIELD => 'Description', OPERATOR => 'IS', VALUE => 'NULL' );
$scrips->Limit( FIELD => 'Description', VALUE => '' );
while ( my $scrip = $scrips->Next ) {
commit 1c2eef928d9f662ff183f8e3f8b011e8d569e355
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Thu Sep 5 13:32:01 2013 -0400
Using RT::Scrip->Create with an in-progress upgrade fails
The ObjectScrips table, which the code will attempt to create a record
in, does not yet exist -- and the 'Disabled' column on Scrips does not
either. Write an explicit call to RT::Record::Create by hand.
diff --git a/etc/upgrade/3.8.3/content b/etc/upgrade/3.8.3/content
index cbb385f..8f0dda1 100644
--- a/etc/upgrade/3.8.3/content
+++ b/etc/upgrade/3.8.3/content
@@ -82,13 +82,22 @@ if ( $extract_action && $extract_action->Id ) {
);
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'
- },
- );
+ push @Final, sub {
+ my $action = RT::ScripAction->new( RT->SystemUser );
+ $action->Load( 'Extract Subject Tag' );
+ my $condition = RT::ScripCondition->new( RT->SystemUser );
+ $condition->Load( 'On Transaction' );
+ my $template = RT::Template->new( RT->SystemUser );
+ $template->LoadByName( Name => 'Blank', Queue => 0 );
+ my $scrip = RT::Scrip->new( RT->SystemUser );
+ $scrip->RT::Record::Create(
+ Description => "On transaction, add any tags in the transaction's subject to the ticket's subject",
+ ScripCondition => $condition->id,
+ ScripAction => $action->id,
+ Template => $template->id,
+ Queue => 0,
+ );
+ };
}
}
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list