Restrict creation of certain issue types to members of a project role

Add this script to a ScriptRunner Simple Scripted Validator on the Create step of a workflow to restrict the creation of certain types of issues to members of a specified project role.


Jira Jira (7.7 - 8.6)

import com.atlassian.jira.component.ComponentAccessor import // the name of the project role final String roleName = "Project Manager Role" // the name of the issue type final String issueType = "Epic" def projectRoleManager = ComponentAccessor.getComponent(ProjectRoleManager) def role = projectRoleManager.getProjectRole(roleName) == issueType && projectRoleManager.isUserInProjectRole(issue.reporter, role, issue.projectObject)
Discovered an issue? Report it here

Suggested for you

Appears in these Collections