[Rt-commit] rt branch 5.0/importer-skip-existing-catalog-role-groups created. rt-5.0.3-141-gdd7c51741c
BPS Git Server
git at git.bestpractical.com
Wed Oct 26 11:33:45 UTC 2022
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt".
The branch, 5.0/importer-skip-existing-catalog-role-groups has been created
at dd7c51741ce0643cc325d62e7afacf5b0bdce934 (commit)
- Log -----------------------------------------------------------------
commit dd7c51741ce0643cc325d62e7afacf5b0bdce934
Author: sunnavy <sunnavy at bestpractical.com>
Date: Wed Oct 26 19:27:53 2022 +0800
Skip existing catalog role groups on import
Otherwise these groups would be duplicated.
diff --git a/lib/RT/Group.pm b/lib/RT/Group.pm
index 9fc202d001..8ae1fd7b20 100644
--- a/lib/RT/Group.pm
+++ b/lib/RT/Group.pm
@@ -1735,6 +1735,11 @@ sub PreInflate {
$queue->Load( $data->{Instance} );
$obj->LoadRoleGroup( Object => $queue, Name => $data->{Name} );
return $duplicated->() if $obj->Id;
+ } elsif ($data->{Domain} eq 'RT::Catalog-Role') {
+ my $catalog = RT::Catalog->new( RT->SystemUser );
+ $catalog->Load( $data->{Instance} );
+ $obj->LoadRoleGroup( Object => $catalog, Name => $data->{Name} );
+ return $duplicated->() if $obj->Id;
}
my $principal = RT::Principal->new( RT->SystemUser );
-----------------------------------------------------------------------
hooks/post-receive
--
rt
More information about the rt-commit
mailing list