Forums

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

Using project roles in JMWE conditions.

jira_admin_cu
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.
June 18, 2025

Hi Team,

What JMWE script should we use as a condition in the JMWE validator? I haven't found any information in the JMWE documentation based on user roles.

JMWE condition.png


2 answers

Suggest an answer

Log in or Sign up to answer
0 votes
Kseniia Trushnikova
Community Champion
November 16, 2025

Hey @jira_admin_cu,

You can use this for the condition:

def projectRoleManager = getComponent(com.atlassian.jira.security.roles.ProjectRoleManager)
def developerRole = projectRoleManager.getProjectRole("Developer")
def project = ComponentAccessor.projectManager.getProjectByCurrentKey("YOUR_PROJECT_KEY")

projectRoleManager.isUserInProjectRole(currentUser,developerRole,project) 

This will check if the current user has the Developer role in a specified project.

0 votes
Mohamed Benziane
Community Champion
June 23, 2025

Hi,

May be this thread should helps you: JMWE Validator create Issuetype by Project Area Ro...

TAGS
AUG Leaders

Atlassian Community Events