[Rt-commit] rt branch, 4.0/working-template-upgrades, created. rt-3.9.7-1189-g0f84cf7
Alex Vandiver
alexmv at bestpractical.com
Wed Jan 12 19:55:30 EST 2011
The branch, 4.0/working-template-upgrades has been created
at 0f84cf7c0e38532286bc5bcc8ea0b572fc85c08a (commit)
- Log -----------------------------------------------------------------
commit f88a4c53e93ae0b4f43841c2e420772b5853bdb8
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Wed Jan 12 19:51:40 2011 -0500
Allow upgrading to continue if there are Templates of type Perl
Because previous parts of the upgrade process use the most recent RT
codebase, earlier parts of an upgrade may have inserted templates,
which picked up the current default of Type => "Perl" The upshoot of
this is that any upgrades from 3.8.5 or before (3.8.6 was the most
recently added template) failed to mark the templates as Perl, and
thus all mail sent out was uninterpolated.
diff --git a/etc/upgrade/3.9.1/content b/etc/upgrade/3.9.1/content
index c7bc535..449d0d7 100644
--- a/etc/upgrade/3.9.1/content
+++ b/etc/upgrade/3.9.1/content
@@ -8,6 +8,13 @@
FIELD => 'Type',
OPERATOR => '!=',
VALUE => 'Action',
+ ENTRYAGGREGATOR => 'AND'
+ );
+ $templates->Limit(
+ FIELD => 'Type',
+ OPERATOR => '!=',
+ VALUE => 'Perl',
+ ENTRYAGGREGATOR => 'AND'
);
if ($templates->Count) {
commit 0f84cf7c0e38532286bc5bcc8ea0b572fc85c08a
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Wed Jan 12 19:54:37 2011 -0500
Continue processing, even if one template upgrade fails
diff --git a/etc/upgrade/3.9.1/content b/etc/upgrade/3.9.1/content
index 449d0d7..e0f4a9a 100644
--- a/etc/upgrade/3.9.1/content
+++ b/etc/upgrade/3.9.1/content
@@ -25,9 +25,7 @@
$templates->UnLimit();
while (my $template = $templates->Next) {
my ($status, $msg) = $template->SetType('Perl');
- unless ( $status ) {
- die "Couldn't change Type of Template #" . $template->Id . ": $msg";
- }
+ $RT::Logger->warning( "Couldn't change Type of Template #" . $template->Id . ": $msg" ) unless $status;
}
},
sub {
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list