[Rt-commit] rt branch, 4.0/template-type-upgrade-warnings, created. rt-4.0.2-112-g358b9c4
Alex Vandiver
alexmv at bestpractical.com
Wed Sep 21 18:54:39 EDT 2011
The branch, 4.0/template-type-upgrade-warnings has been created
at 358b9c431d85acced23ae08ec3b07e583edf45d3 (commit)
- Log -----------------------------------------------------------------
commit 358b9c431d85acced23ae08ec3b07e583edf45d3
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Wed Sep 21 18:53:14 2011 -0400
Skip templates which are already the correct type
Templates which are installed earlier in the upgrade process will
already have Type set to Perl; avoid warnings of the form "Couldn't
change Type of Template #42: That is already the current value" by
skipping templates which are already correct.
diff --git a/etc/upgrade/3.9.1/content b/etc/upgrade/3.9.1/content
index e0f4a9a..2a90363 100644
--- a/etc/upgrade/3.9.1/content
+++ b/etc/upgrade/3.9.1/content
@@ -22,7 +22,11 @@
}
$templates = RT::Templates->new(RT->SystemUser);
- $templates->UnLimit();
+ $templates->Limit(
+ FIELD => 'Type',
+ OPERATOR => '!=',
+ VALUE => 'Perl',
+ );
while (my $template = $templates->Next) {
my ($status, $msg) = $template->SetType('Perl');
$RT::Logger->warning( "Couldn't change Type of Template #" . $template->Id . ": $msg" ) unless $status;
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list