How to set a workflow condition for groups as well as roles in jira , (FYI both are different projects but workflow is same ) .
One project using roles and another project using group permission scheme.
Hi,
This can be done using Jira Expressions, but you will need an app that supports custom workflow conditions with Jira Expressions. In my biased opinion Cloud Workflows is a great option, but there are other apps available as well.
Once you got your app-of-choice installed, just add a workflow condition that allows Jira Expressions. Let's say you want to check that a user either is in role 'Developer' in project PRJA or in role 'Admin' in project PRJB or is in the global group 'jira-administrators'. You would use an expression like this:
(user.getProjectRoles(new Project('PRJA')).filter(r => r.name == 'Developer').length > 0)
||
(user.getProjectRoles(new Project('PRJB')).filter(r => r.name == 'Admin').length > 0)
||
user.groups.includes("jira-administrators")
Depending on your exact use-case, you might need to experiment a bit, so here's the Jira Expressions reference documentation and the introduction guide.
Hope that helps,
Oliver
Full disclosure: I work for Jodocus, the Vendor who created Cloud Workflows. Let me know if you need any help getting started.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.