You can now vote for scripts to help people know if they're useful or not. Login or create an account to vote!


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.


I am a Project Manager. In my development team, I have two staff members who are in charge of Bug issue types. I want to make sure that any bug issues created can only be assigned to one of these two developers. To do this, I create a project role with the two developers and use this script to restrict the assignee.

Good to Know

  • The project role must exist and contain the users who we want the transition to be validated.
  • The issue type must exist.
  • You can configure the step in the workflow where you want the validator to be executed.


  • Jira Jira (8.0 - 8.14)
  • ScriptRunner for Jira ScriptRunner for Jira (6.18.0)
import com.atlassian.jira.component.ComponentAccessor import // the name of the project role def roleName = 'Project Manager Role' // the name of the issue type def 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