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.
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.
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.