[Bps-public-commit] RT-Extension-MandatoryOnTransition branch, support-coreroles-and-customroles, repushed
Craig Kaiser
craig at bestpractical.com
Fri Feb 1 16:56:18 EST 2019
The branch support-coreroles-and-customroles was deleted and repushed:
was 999d738b1eabdd6e112e9415421490864f2e3ab4
now 2efeba46f59567317692f4421d603fc17837ad1d
1: 27e5c92 ! 1: ff81d7e Support customroles for mandatoryontransition conditions
@@ -211,7 +211,7 @@
+ my $role_object = RT::CustomRole->new($args{Ticket}->CurrentUser);
+
+ my ($ret, $msg) = $role_object->Load($role);
-+ push @errors, $CurrentUser->loc("Failed to load customrole $role: $msg") unless $ret;
++ push @errors, $CurrentUser->loc("Failed to load custom role $role: $msg") unless $ret;
+ return \@errors unless $ret;
+
+ $role_arg = 'RT::CustomRole-' . $role_object->Id;
2: 77e91ad ! 2: 8462a40 Support all core role fields as mandatory on transition fields
@@ -124,13 +124,11 @@
+ $owner_value = $ARGSRef->{$role};
+ }
-- my $role_object = RT::CustomRole->new($args{Ticket}->CurrentUser);
--
-- my ($ret, $msg) = $role_object->Load($role);
-- push @errors, $CurrentUser->loc("Failed to load customrole $role: $msg") unless $ret;
-- return \@errors unless $ret;
-+ # If no value provided in ARGS then grab the current value of the ticket
-+ $owner_value = $args{Ticket}->Owner unless $owner_value;
+ my $role_object = RT::CustomRole->new($args{Ticket}->CurrentUser);
+
+@@
+ push @errors, $CurrentUser->loc("Failed to load custom role $role: $msg") unless $ret;
+ return \@errors unless $ret;
- $role_arg = 'RT::CustomRole-' . $role_object->Id;
+ my $user = RT::User->new( $args{Ticket}->CurrentUser );
3: e516c76 = 3: 6be7907 Support requiring a role to be a member of a group
4: 5c6ef55 = 4: 463c3ea Create test file for roles
5: 999d738 ! 5: 2efeba4 Update README and Changelog
@@ -100,7 +100,7 @@
+=head2 Requiring role values
+
+You can require any core or custom role on a RT::Ticket object, below is an
-+example of requiring a customrole "customer" be set on transition from open
++example of requiring a custom role "customer" be set on transition from open
+and the owner also be set for the ticket on transition from a status of open.
+
+Set( %MandatoryOnTransition,
More information about the Bps-public-commit
mailing list