[Bps-public-commit] RT-Extension-MandatoryOnTransition branch, support-coreroles-and-customroles, repushed
Craig Kaiser
craig at bestpractical.com
Mon Jan 7 11:06:59 EST 2019
The branch support-coreroles-and-customroles was deleted and repushed:
was 1ecb623d131fe5d4530d0b6dfb172deda91f1b30
now c1563d58ecc29aacef42c00849a4858f828fe35b
1: 53b566f ! 1: c951d4c Support customrole mandatoryontransition conditions
@@ -5,8 +5,6 @@
Use the syntax 'CustomRole.MyRole' to set mandatory conditions for
customrole values. Pass a group key to specify if one of the current
users for the customrole must be a member of a specific group.
-
- Before
diff --git a/lib/RT/Extension/MandatoryOnTransition.pm b/lib/RT/Extension/MandatoryOnTransition.pm
--- a/lib/RT/Extension/MandatoryOnTransition.pm
@@ -38,7 +36,7 @@
my @cfs = map { /^CF\.(.+)$/i; $1; }
grep { /^CF\./i } @$required;
+ my @roles = map { /^(:?[CustomRole\.]?.+)$/i; $1; }
-+ grep { /^CustomRole\.||AdminCc||Cc||Requestor/i } @$required;
++ grep { /^CustomRole\.|^AdminCc|^Cc|^Requestor|^Owner/i } @$required;
# Pull out any must_be or must_not_be rules
my %cf_must_values = ();
@@ -95,12 +93,12 @@
Ticket => $args{'Ticket'},
Queue => $args{'Queue'} ? $args{'Queue'}->Name : undef,
From => $args{'From'},
-@@
+ To => $args{'To'},
NewQueue => $$ARGSRef{'Queue'},
);
-
+-
- return \@errors unless @$core or @$cfs;
-+ return \@errors unless @$core or @$cfs or @$roles;
++ return \@errors unless @$core or @$cfs or $roles;
my $transition = ($args{'From'} ||'') ne ($args{'To'} || '') ? 'Status' : 'Queue';
2: 609d0c3 = 2: e6296cc Allow group key to be set for roles
3: 9b18d25 ! 3: e746df7 Move Owner code into the roles code block
@@ -31,15 +31,6 @@
);
=head2 Methods
-@@
- my @cfs = map { /^CF\.(.+)$/i; $1; }
- grep { /^CF\./i } @$required;
- my @roles = map { /^(:?[CustomRole\.]?.+)$/i; $1; }
-- grep { /^CustomRole\.||AdminCc||Cc||Requestor/i } @$required;
-+ grep { /^CustomRole\.||AdminCc||Cc||Requestor||Owner/i } @$required;
-
- # Pull out any must_be or must_not_be rules
- my %cf_must_values = ();
@@
: $CORE_FOR_CREATE{$field};
next unless $arg;
4: 1ecb623 = 4: c1563d5 Update README and inc files
More information about the Bps-public-commit
mailing list