[Rt-commit] rt branch, 4.0/upgrade-warning-from-3.8, created. rt-4.0.19-62-ga8af323

Alex Vandiver alexmv at bestpractical.com
Mon Mar 24 15:14:38 EDT 2014


The branch, 4.0/upgrade-warning-from-3.8 has been created
        at  a8af3233b302adc021f1fe78de0f7d3fbee8ebb7 (commit)

- Log -----------------------------------------------------------------
commit a8af3233b302adc021f1fe78de0f7d3fbee8ebb7
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Mon Mar 24 14:48:33 2014 -0400

    Avoid "uninitialized value in eq" warnings on upgrades from 3.8
    
    In 3.8, the Type parameter was never passed to SUPER::Create, leading to
    all 3.8 databases having a NULL 'Type' column.  If upgrading to 4.0 from
    3.8.8 or before, the 3.8.9 upgrade step is run with a 4.0 lib/ but a 3.8
    database; the examination of ->Type in ->SetContent thus causes a
    warning.
    
    Explicitly set the type (to the default, Perl) before calling
    SetContent, to avoid the warnings.  This does not confuse the later Type
    upgrade step (in 3.9.1), as that updates Type = NULL rows, and only
    aborts if it finds rows with Type != 'Perl'
    
    Fixes issues #17505.

diff --git a/etc/upgrade/3.8.9/content b/etc/upgrade/3.8.9/content
index 898c19e..d7d64f5 100644
--- a/etc/upgrade/3.8.9/content
+++ b/etc/upgrade/3.8.9/content
@@ -56,6 +56,7 @@
 s!(?<=Your ticket has been (?:approved|rejected) by { eval { )\$Approval->OwnerObj->Name!\$Approver->Name!
               )
             {
+                $template->SetType('Perl');
                 $template->SetContent($content);
             }
         }

-----------------------------------------------------------------------


More information about the rt-commit mailing list