[Rt-commit] rt branch, 4.4/custom-role-serializer, updated. rt-4.4.2-6-gc276cb5

Shawn Moore shawn at bestpractical.com
Tue Oct 10 11:47:46 EDT 2017


The branch, 4.4/custom-role-serializer has been updated
       via  c276cb5f808e4abec032067b2facccd0573f50c6 (commit)
      from  426a61ec1e856d0af1a175884bd6ed09794847b5 (commit)

Summary of changes:
 lib/RT/Group.pm | 5 +++++
 1 file changed, 5 insertions(+)

- Log -----------------------------------------------------------------
commit c276cb5f808e4abec032067b2facccd0573f50c6
Author: Shawn M Moore <shawn at bestpractical.com>
Date:   Tue Oct 10 15:47:33 2017 +0000

    Load custom role obj in group name during import

diff --git a/lib/RT/Group.pm b/lib/RT/Group.pm
index 5ed026e..3cc566f 100644
--- a/lib/RT/Group.pm
+++ b/lib/RT/Group.pm
@@ -1638,6 +1638,11 @@ sub PreInflate {
     my $principal_id  = delete $data->{PrincipalId};
     my $disabled      = delete $data->{Disabled};
 
+    if (ref($data->{Name})) {
+        my $role = $importer->LookupObj(${ $data->{Name} });
+        $data->{Name} = $role->GroupType;
+    }
+
     # Inflate refs into their IDs
     $class->SUPER::PreInflate( $importer, $uid, $data );
 

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


More information about the rt-commit mailing list