Using Behaviours to restrict issue type selection for project role

We use a behaviours script to restrict the issue type selection for a specific project role.

For the restriction to one issue type the following script works perfectly:


import com.atlassian.jira.component.ComponentAccessor

import static com.atlassian.jira.issue.IssueFieldConstants.ISSUE_TYPE
def constantsManager = ComponentAccessor.getConstantsManager()
def queryIssueType = constantsManager.getAllIssueTypeObjects().find { == "Feedback"}
def IssueType = getFieldById(ISSUE_TYPE)


The question is: How to change the script for a restriction to TWO issue types???

1 answer

1 accepted

1 vote
Jenna Davis Community Champion Dec 07, 2017


What version of ScriptRunner are you currently using? 

There is a bug that may prevent you from being able to do this effecting newer versions.


Hi Jenna,

we are using the version 5.2.2 of ScriptRunner.

Will there be a solution for the bug in the near future?




Jenna Davis Community Champion Dec 07, 2017

I believe that bug will effect you then.

I'm afraid we don't have a set timeline for issues, so I cannot give you a good estimate.


Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published yesterday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

72 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you