Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to set a workflow condition for groups as well as roles in jira , (FYI both are different proje

kudukuntla.shekar July 22, 2020

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.

 

 

1 answer

1 vote
Oliver Siebenmarck _Polymetis Apps_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 22, 2020

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.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events