Hi, Guys,
Im need to create validator for Role who can create specific workflow used JMWE, since jira don't have creator setting for specific issuetype
I try create Build-your-own (scripted) Validator
I Look in Global variable : user.getProjectRoles(issue.project)
but I dont know how to use it.
Can you how to create validator for issuetype "task" can created by user role "IT Project Manager"?
Hi @Tyas Iglecias ,
Modify the Jira Expression to below, which also checks the accountId of the user.
(!!issue.issueType && issue.issueType.name != "Task") || user.getProjectRoles(issue.project).some(pr => pr.name == "IT Project Manager") || user.accountId == "xxxxx"
Replace xxxxx with the accountId of the JMWE add-on user.
To insert the accountId of any user, select "Lookup user", search for the desired user and click on "Insert accountId".
Hope this helps!
Regards,
Suprija
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Tyas Iglecias ,
Add the below Jira Expression in "Build-your-own (scripted) Validator (JMWE app)", which returns true for Task issue type, only if the user is in the "IT Project Manager" role of that project (and returns true for issue types other than Task, irrespective of the user's role) :
(!!issue.issueType && issue.issueType.name != "Task") || user.getProjectRoles(issue.project).some(pr => pr.name == "IT Project Manager")
Hope this helps!
Regards,
Suprija
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Suprija Sirikonda _Appfire_
Thanks for information, it works
I have another question,
how to set validation, Task can created by user role and automate by JMWE?
cause I not found JMWE as user/role/group
and what i know, Task can't create automate if we just set validation as role "Project Manager"
Regards,
Tyas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.