Hello,
I need some help when issue moving from open to in progress status and I need Log Work system field mandatory based on specific group members. And I added this Log Work field in transition screen and i want to make this field mandatory based on specific group members only. Please help me how to achieve this issue.
Note: we are using script runner, JSU,JMWE and JWT apps in my jira instance.
Thanks in advance,
Siva
Hi @siva
you can use JMWE's Field Required Validator, and for the Conditional Validation use this script:
currentUser.isInGroup("some-group")
Thanks for the reply and I used JMWE's Field Required Validator and used script what you mention in above comment and it working perfect.
The present script works only on single group is there any possibility to set multiple groups in the script. Once again thanks for your help very appreciated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sure. If you want to test whether the current user is in one of several groups, use something like this
currentUser.isInGroup("some-group") || currentUser.isInGroup("other-group") || currentUser.isInGroup("yet-another-group")
And if you want to test if the current user belongs to all of several groups, use something like this
currentUser.isInGroup("some-group") && currentUser.isInGroup("other-group") && currentUser.isInGroup("yet-another-group")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @siva ,
only for the reason of completeness here also the way with JWT:
You can solve the condition via a logical condition with the isInGroup expression:
isInGroup(%{system.currentUser},"jira-administrators")
And analogous to JMWE you can use a Field required validator to make the field for the transition mandatory.
Furthermore, you will find in the UseCase library many more examples for the application of JWT in workflows, overall automation, and calculated custom fields.
For further questions about JWT, you can always contact our support.
Cheers,
Frank
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @siva - Try this...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.