[Rt-commit] rt branch, 4.0.4-releng, updated. rt-4.0.3-3-gb21a2cb
Alex Vandiver
alexmv at bestpractical.com
Thu Nov 10 15:18:13 EST 2011
The branch, 4.0.4-releng has been updated
via b21a2cb0e80ceca1b27385ba478629b8663d65af (commit)
from 580d4d78b7dbe5faba63d80cab464bd8308346fd (commit)
Summary of changes:
etc/upgrade/3.9.1/content | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
- Log -----------------------------------------------------------------
commit b21a2cb0e80ceca1b27385ba478629b8663d65af
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Thu Nov 10 15:09:13 2011 -0500
Fix the ->Count call ot warn on the correct set of templates
The previous logic, checking if Type != 'Action', is unnecessary because
the Template->Create method never passed its Type argument through to
SUPER::Create. As such, we should warn if there are _any_ non-NULL Type
values in the database -- excepting, of course, rows that we've
previously added via earlier initialdata's using the current codebase,
which will properly have Type = 'Perl'.
diff --git a/etc/upgrade/3.9.1/content b/etc/upgrade/3.9.1/content
index 866d74a..d336a18 100644
--- a/etc/upgrade/3.9.1/content
+++ b/etc/upgrade/3.9.1/content
@@ -3,18 +3,15 @@
use strict;
$RT::Logger->debug('Make sure templates all have known types');
+ # We update all NULL rows, below. We want to find non-NULL
+ # rows, which weren't created by the current codebase running
+ # through earlier initialdatas. Type != 'Perl' enforces the
+ # non-NULL part, as well
my $templates = RT::Templates->new(RT->SystemUser);
$templates->Limit(
FIELD => 'Type',
OPERATOR => '!=',
- VALUE => 'Action',
- ENTRYAGGREGATOR => 'AND'
- );
- $templates->Limit(
- FIELD => 'Type',
- OPERATOR => '!=',
VALUE => 'Perl',
- ENTRYAGGREGATOR => 'AND'
);
if ($templates->Count) {
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list