[Rt-commit] rt branch, 4.4/dump-and-merge-initialdata, updated. rt-4.4.3-132-g6f7a54d13

? sunnavy sunnavy at bestpractical.com
Mon Aug 27 15:53:21 EDT 2018


The branch, 4.4/dump-and-merge-initialdata has been updated
       via  6f7a54d1384d31b6cac0a3abb72327d1b4184d31 (commit)
      from  a544b61da251d6973e02ec511681fac836e22bea (commit)

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

- Log -----------------------------------------------------------------
commit 6f7a54d1384d31b6cac0a3abb72327d1b4184d31
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Tue Aug 28 03:46:22 2018 +0800

    Load template with both name and queue in initialdata
    
    We support queue-level templates with the same name as global ones.

diff --git a/lib/RT/Handle.pm b/lib/RT/Handle.pm
index 88613d238..e70e8c54a 100644
--- a/lib/RT/Handle.pm
+++ b/lib/RT/Handle.pm
@@ -2747,6 +2747,9 @@ sub _LoadObject {
         }
         $object->LoadByCols( Group => $group->PrincipalObj, Member => $member->PrincipalObj );
     }
+    elsif ( $class eq 'RT::Template' ) {
+        $object->LoadByName( Name => $values->{_Original}{Name}, Queue => $values->{_Original}{Queue} );
+    }
     elsif ( $class eq 'RT::Scrip' ) {
         $object->LoadByCols( Description => $values->{_Original}{Description} );
     }

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


More information about the rt-commit mailing list