[Bps-public-commit] rtx-migrate branch, master, updated. 0.14-2-gb7368a3

Alex Vandiver alexmv at bestpractical.com
Wed Dec 4 18:10:45 EST 2013


The branch, master has been updated
       via  b7368a3b4b0c0daf64eae1e33553d18ed97fb7ad (commit)
       via  48f20f0b657e1d822218133a00cc039b739e3cc5 (commit)
      from  7a1980242ad4e964f8a96504bce6634684054714 (commit)

Summary of changes:
 lib/RT/Migrate/Incremental.pm | 2 +-
 lib/RT/Migrate/Serializer.pm  | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

- Log -----------------------------------------------------------------
commit 48f20f0b657e1d822218133a00cc039b739e3cc5
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Wed Nov 27 18:25:38 2013 -0500

    Don't run upgrades unless this is an incremental serialization.
    
    If you're running serializer on 4.0.x, this code would try to apply all
    the upgrade steps up to 4.2.y before writing out the object.
    
    Instead - limit to the current RT version.

diff --git a/lib/RT/Migrate/Serializer.pm b/lib/RT/Migrate/Serializer.pm
index 6b90ba7..78395aa 100644
--- a/lib/RT/Migrate/Serializer.pm
+++ b/lib/RT/Migrate/Serializer.pm
@@ -113,6 +113,9 @@ sub Metadata {
     # Determine the highest upgrade step that we run
     my @versions = ($RT::VERSION, keys %RT::Migrate::Incremental::UPGRADES);
     my ($max) = reverse sort cmp_version @versions;
+    # we don't want to run upgrades to 4.2.x if we're running
+    # the serializier on an 4.0 instance.
+    $max = $RT::VERSION unless $self->{Incremental};
 
     return {
         Format       => "0.8",

commit b7368a3b4b0c0daf64eae1e33553d18ed97fb7ad
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Wed Nov 27 18:28:21 2013 -0500

    Noticed when running rt-serializer on 4.0 and incremetal upgrades ran.
    
    $ref is a hashref, not an object, so you need to access {Domain} not
    call the Domain method.

diff --git a/lib/RT/Migrate/Incremental.pm b/lib/RT/Migrate/Incremental.pm
index db645c7..da6ecae 100644
--- a/lib/RT/Migrate/Incremental.pm
+++ b/lib/RT/Migrate/Incremental.pm
@@ -525,7 +525,7 @@ s!(?<=Your ticket has been (?:approved|rejected) by { eval { )\$Approval->OwnerO
         'RT::Group' => sub {
             my ($ref) = @_;
             $ref->{Name} = $ref->{Type}
-                if $ref->Domain =~ /^(ACLEquivalence|SystemInternal|.*-Role)$/;
+                if $ref->{Domain} =~ /^(ACLEquivalence|SystemInternal|.*-Role)$/;
         },
     },
 

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



More information about the Bps-public-commit mailing list