diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index d7ffeaac4..f6bb7baee 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -15,6 +15,7 @@ - Added individual shipping requirements to the Sku. - added #10145: Global Head Tags in Settings - added packing to templates, snippets, and head tags. + - added #9289: Extending the "Request Approval For Version Tag" activity by reversing the test (Bernd Kalbfuß-Zimmermann) 7.7.4 - rfe: Extend DateTime for Week-Nrs (#9151) diff --git a/lib/WebGUI/Workflow/Activity/RequestApprovalForVersionTag/ByCommitterGroup.pm b/lib/WebGUI/Workflow/Activity/RequestApprovalForVersionTag/ByCommitterGroup.pm index 29cda58e3..9a24d98c7 100644 --- a/lib/WebGUI/Workflow/Activity/RequestApprovalForVersionTag/ByCommitterGroup.pm +++ b/lib/WebGUI/Workflow/Activity/RequestApprovalForVersionTag/ByCommitterGroup.pm @@ -63,6 +63,12 @@ sub definition { label => $i18n->get( 'committerGroupId label' ), hoverHelp => $i18n->get( 'committerGroupId description' ), }, + invertGroupSetting => { + fieldType => "yesNo", + defaultValue => 0, + label => $i18n->get( 'invertGroupSetting label' ), + hoverHelp => $i18n->get( 'invertGroupSetting description' ), + }, }, }; return $class->SUPER::definition( $session, $definition ); @@ -86,7 +92,8 @@ sub execute { my $committedBy = WebGUI::User->new( $self->session, $tag->get( 'committedBy' ) ); # If tag is handled by this activity - if ( $committedBy->isInGroup( $self->get( 'committerGroupId' ) ) ) { + if ( (!$self->get( 'invertGroupSetting' ) && $committedBy->isInGroup( $self->get( 'committerGroupId' ) ) ) + || ($self->get( 'invertGroupSetting' ) && !$committedBy->isInGroup( $self->get( 'committerGroupId' ) ) ) ) { return $self->SUPER::execute( $tag, $instance ); } else { diff --git a/lib/WebGUI/i18n/English/Activity_RequestApprovalForVersionTag_ByCommitterGroup.pm b/lib/WebGUI/i18n/English/Activity_RequestApprovalForVersionTag_ByCommitterGroup.pm index 56758d4d1..477a26b47 100644 --- a/lib/WebGUI/i18n/English/Activity_RequestApprovalForVersionTag_ByCommitterGroup.pm +++ b/lib/WebGUI/i18n/English/Activity_RequestApprovalForVersionTag_ByCommitterGroup.pm @@ -14,6 +14,18 @@ our $I18N = { lastUpdated => 1213631384, context => q{Description of activity property}, }, + 'invertGroupSetting label' => { + message => q{Invert Group Setting}, + lastUpdated => 1232298054, + context => q{Label for activity property}, + }, + 'invertGroupSetting description' => { + message => q{If selected yes, only users that are not members of the selected committer + group will require approval for using this activity. If the committer is a + member of this group, the workflow will continue with the next activity. }, + lastUpdated => 1232298054, + context => q{Description of activity property}, + }, topicName => { message => q{Request Approval By Committer Group}, lastUpdated => 0,