[Rt-commit] rt branch, 4.2/serializer-deprecation-updates, created. rt-4.2.1-186-gd9b3d7d

Alex Vandiver alexmv at bestpractical.com
Tue Jan 7 16:32:18 EST 2014


The branch, 4.2/serializer-deprecation-updates has been created
        at  d9b3d7d8bb69292d397e17d8dd4a459924ffff45 (commit)

- Log -----------------------------------------------------------------
commit 5f0f17368e423108dc95b595528c10afb548517e
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Thu Jan 2 15:39:41 2014 -0500

    Remove case sensitivity on Domain to use faster indexes

diff --git a/lib/RT/Queue.pm b/lib/RT/Queue.pm
index fe5754e..e4f59fd 100644
--- a/lib/RT/Queue.pm
+++ b/lib/RT/Queue.pm
@@ -1096,7 +1096,7 @@ sub FindDependencies {
 
     # Queue role groups( Cc, AdminCc )
     my $objs = RT::Groups->new( $self->CurrentUser );
-    $objs->Limit( FIELD => 'Domain', VALUE => 'RT::Queue-Role' );
+    $objs->Limit( FIELD => 'Domain', VALUE => 'RT::Queue-Role', CASESENSITIVE => 0 );
     $objs->Limit( FIELD => 'Instance', VALUE => $self->Id );
     $deps->Add( in => $objs );
 
diff --git a/lib/RT/Ticket.pm b/lib/RT/Ticket.pm
index cd1a6aa..961e4d0 100644
--- a/lib/RT/Ticket.pm
+++ b/lib/RT/Ticket.pm
@@ -3587,7 +3587,7 @@ sub FindDependencies {
 
     # Ticket role groups( Owner, Requestors, Cc, AdminCc )
     $objs = RT::Groups->new( $self->CurrentUser );
-    $objs->Limit( FIELD => 'Domain', VALUE => 'RT::Ticket-Role' );
+    $objs->Limit( FIELD => 'Domain', VALUE => 'RT::Ticket-Role', CASESENSITIVE => 0 );
     $objs->Limit( FIELD => 'Instance', VALUE => $self->Id );
     $deps->Add( in => $objs );
 
diff --git a/lib/RT/User.pm b/lib/RT/User.pm
index 1f94106..c07cfc8 100644
--- a/lib/RT/User.pm
+++ b/lib/RT/User.pm
@@ -2672,7 +2672,7 @@ sub FindDependencies {
 
     # ACL equivalence group
     my $objs = RT::Groups->new( $self->CurrentUser );
-    $objs->Limit( FIELD => 'Domain', VALUE => 'ACLEquivalence' );
+    $objs->Limit( FIELD => 'Domain', VALUE => 'ACLEquivalence', CASESENSITIVE => 0 );
     $objs->Limit( FIELD => 'Instance', VALUE => $self->Id );
     $deps->Add( in => $objs );
 
@@ -2695,6 +2695,7 @@ sub FindDependencies {
         ALIAS => $groups,
         FIELD => 'Domain',
         VALUE => 'SystemInternal',
+        CASESENSITIVE => 0
     );
     $deps->Add( in => $objs );
 

commit d407a4ccb5b7883df339184872ca50fcd5e4566a
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Thu Jan 2 15:40:01 2014 -0500

    _SQLLimit was deprecated in favor of simple Limit

diff --git a/lib/RT/Queue.pm b/lib/RT/Queue.pm
index e4f59fd..9b680fd 100644
--- a/lib/RT/Queue.pm
+++ b/lib/RT/Queue.pm
@@ -1135,7 +1135,7 @@ sub FindDependencies {
 
     # Tickets
     $objs = RT::Tickets->new( $self->CurrentUser );
-    $objs->_SQLLimit( FIELD => "Queue", VALUE => $self->Id );
+    $objs->Limit( FIELD => "Queue", VALUE => $self->Id );
     $objs->{allow_deleted_search} = 1;
     $deps->Add( in => $objs );
 }

commit cc97a0017255ed2e00b816c197baa0cb711ae3b5
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Thu Jan 2 15:40:19 2014 -0500

    ->LimitToRolesForSystem was deprecated in favor of >LimitToRolesForObject( RT->System )

diff --git a/lib/RT/Migrate/Serializer.pm b/lib/RT/Migrate/Serializer.pm
index a5b7d02..2afb7fe 100644
--- a/lib/RT/Migrate/Serializer.pm
+++ b/lib/RT/Migrate/Serializer.pm
@@ -241,7 +241,7 @@ sub PushBasics {
 
     # System role groups
     my $systemroles = RT::Groups->new( RT->SystemUser );
-    $systemroles->LimitToRolesForSystem;
+    $systemroles->LimitToRolesForObject( RT->System );
     $self->PushObj( $systemroles );
 
     # CFs on Users, Groups, Queues

commit e35a2259e7f4bd046c94d571938869ef9522a848
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Thu Jan 2 15:42:04 2014 -0500

    Remove unnecessary 3.8-compat logic
    
    892d3721 included logic to work on RT 3.8-style configurations, because
    the commit was also destined for RTx-Migrate, which must fon on earlier
    version of RT.  Such logic is unnecessary in core RT; remove it.

diff --git a/lib/RT/Migrate.pm b/lib/RT/Migrate.pm
index bd13b1d..710a327 100644
--- a/lib/RT/Migrate.pm
+++ b/lib/RT/Migrate.pm
@@ -177,19 +177,11 @@ sub setup_logging {
     my ($dir, $file) = @_;
 
 
-    if ( RT->can('Config') && RT->Config->can('Set') ) {
-        RT->Config->Set(LogToScreen    => 'warning');
-        RT->Config->Set(LogToFile      => 'warning');
-        RT->Config->Set(LogDir         => $dir);
-        RT->Config->Set(LogToFileNamed => $file);
-        RT->Config->Set(LogStackTraces => 'error');
-    } else { # running before 3.8
-        $RT::LogToScreen    = 'warning';
-        $RT::LogToFile      = 'warning';
-        $RT::LogDir         = $dir;
-        $RT::LogToFileNamed = $file;
-        $RT::LogStackTraces = 'error';
-    }
+    RT->Config->Set(LogToScreen    => 'warning');
+    RT->Config->Set(LogToFile      => 'warning');
+    RT->Config->Set(LogDir         => $dir);
+    RT->Config->Set(LogToFileNamed => $file);
+    RT->Config->Set(LogStackTraces => 'error');
 
     undef $RT::Logger;
     RT->InitLogging();

commit 09f7116f2cb2d51f709edc9597ec64facaa4f46f
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Thu Jan 2 15:43:48 2014 -0500

    Switch from the deprecated LogToScreen to LogtoSTDERR

diff --git a/lib/RT/Migrate.pm b/lib/RT/Migrate.pm
index 710a327..9f04294 100644
--- a/lib/RT/Migrate.pm
+++ b/lib/RT/Migrate.pm
@@ -177,7 +177,7 @@ sub setup_logging {
     my ($dir, $file) = @_;
 
 
-    RT->Config->Set(LogToScreen    => 'warning');
+    RT->Config->Set(LogToSTDERR    => 'warning');
     RT->Config->Set(LogToFile      => 'warning');
     RT->Config->Set(LogDir         => $dir);
     RT->Config->Set(LogToFileNamed => $file);

commit b10aa9f5b82e4d75893c035c1a474e86559890fb
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Tue Jan 7 16:29:34 2014 -0500

    IsApplied is deprecated in favor of IsAdded, or IsGlobal

diff --git a/lib/RT/Migrate/Importer.pm b/lib/RT/Migrate/Importer.pm
index a7acc05..14fb23a 100644
--- a/lib/RT/Migrate/Importer.pm
+++ b/lib/RT/Migrate/Importer.pm
@@ -427,7 +427,7 @@ sub CloseStream {
     # Take global CFs which we made and make them un-global
     my @queues = grep {$_} map {$self->LookupObj( $_ )} @{$self->{NewQueues}};
     for my $obj (map {$self->LookupObj( $_ )} @{$self->{NewCFs}}) {
-        my $ocf = $obj->IsApplied( 0 ) or next;
+        my $ocf = $obj->IsGlobal or next;
         $ocf->Delete;
         $obj->AddToObject( $_ ) for @queues;
     }

commit d9b3d7d8bb69292d397e17d8dd4a459924ffff45
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Tue Jan 7 16:31:19 2014 -0500

    Switch to the non-deprecated Name column, from Type

diff --git a/lib/RT/Group.pm b/lib/RT/Group.pm
index b07534b..f38f7a1 100644
--- a/lib/RT/Group.pm
+++ b/lib/RT/Group.pm
@@ -1680,10 +1680,12 @@ sub PreInflate {
             return $duplicated->();
         }
     } elsif ($data->{Domain} =~ /^(SystemInternal|RT::System-Role)$/) {
-        $obj->LoadByCols( Domain => $data->{Domain}, Type => $data->{Type} );
+        $obj->LoadByCols( Domain => $data->{Domain}, Name => $data->{Name} );
         return $duplicated->() if $obj->Id;
     } elsif ($data->{Domain} eq "RT::Queue-Role") {
-        $obj->LoadQueueRoleGroup( Queue => $data->{Instance}, Type => $data->{Type} );
+        my $queue = RT::Queue->new( RT->SystemUser );
+        $queue->Load( $data->{Instance} );
+        $obj->LoadRoleGroup( Object => $queue, Name => $data->{Name} );
         return $duplicated->() if $obj->Id;
     }
 

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


More information about the rt-commit mailing list