[Rt-commit] rt branch, 4.0.4-releng, updated. rt-4.0.3-2-g580d4d7

Kevin Falcone falcone at bestpractical.com
Thu Nov 10 15:09:09 EST 2011


The branch, 4.0.4-releng has been updated
       via  580d4d78b7dbe5faba63d80cab464bd8308346fd (commit)
      from  c249954702e7e8a993507c2d0796201d01123625 (commit)

Summary of changes:
 etc/upgrade/4.0.4/content |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
 create mode 100644 etc/upgrade/4.0.4/content

- Log -----------------------------------------------------------------
commit 580d4d78b7dbe5faba63d80cab464bd8308346fd
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Thu Nov 10 15:08:07 2011 -0500

    Flip any NULL Types to Perl
    
    This fixes anyone who went 3.8.x->4.0.3 and ended up with
    Templates.Type still being NULL.  If you go 3.8.x->4.0.4 then
    the repaired 3.9.1 upgrade script will have already done this, and this
    will be a NOOP

diff --git a/etc/upgrade/4.0.4/content b/etc/upgrade/4.0.4/content
new file mode 100644
index 0000000..fdfcb3e
--- /dev/null
+++ b/etc/upgrade/4.0.4/content
@@ -0,0 +1,16 @@
+ at Initial = (
+    sub {
+        use strict;
+        my $templates = RT::Templates->new(RT->SystemUser);
+        $templates->Limit(
+            FIELD => 'Type',
+            OPERATOR => 'IS',
+            VALUE => 'NULL',
+        );
+        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