[Rt-commit] r8168 - rtir/branches/2.3-EXPERIMENTAL/lib/RT/Action
ruz at bestpractical.com
ruz at bestpractical.com
Sat Jul 14 23:32:13 EDT 2007
Author: ruz
Date: Sat Jul 14 23:32:13 2007
New Revision: 8168
Modified:
rtir/branches/2.3-EXPERIMENTAL/lib/RT/Action/RTIR_SetConstituencyGroup.pm
Log:
* delete group only if it's name matches 'DutyTeam Some thing'
Modified: rtir/branches/2.3-EXPERIMENTAL/lib/RT/Action/RTIR_SetConstituencyGroup.pm
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/lib/RT/Action/RTIR_SetConstituencyGroup.pm (original)
+++ rtir/branches/2.3-EXPERIMENTAL/lib/RT/Action/RTIR_SetConstituencyGroup.pm Sat Jul 14 23:32:13 2007
@@ -37,7 +37,7 @@
while ( my $group = $groups->Next ) {
if ( lc $group->Name eq lc "dutyteam $constituency" ) {
$required_group_there = 1;
- } else {
+ } elsif ( $group->Name =~ /^DutyTeam\s+\S.*$/ ) {
my ($status, $msg) = $ticket->DeleteWatcher(
Type => 'AdminCc',
PrincipalId => $group->id,
@@ -47,9 +47,9 @@
}
if ( !$required_group_there && $constituency ) {
my $group = RT::Group->new( $RT::SystemUser );
- $group->LoadUserDefinedGroup('DutyTeam '. $constituency);
+ $group->LoadUserDefinedGroup("DutyTeam $constituency");
unless ( $group->id ) {
- $RT::Logger->warning("Couldn't load group 'DutyTeam ". $constituency ."'");
+ $RT::Logger->warning("Couldn't load group 'DutyTeam $constituency'");
# return success as if there is no custom group for the constituency
# then it means that no custom ACLs should be applied
return 1;
More information about the Rt-commit
mailing list