Forums

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

Need to hide specific issue types from issue type dropdown

Sudheer Kumar April 15, 2025

I’ve implemented the behaviour script to hide the "Issue type3" and "issue type4" issutype from the dropdown selection. It’s working as expected in Firefox—those issue types are hidden.
However, in Chrome, the issue types are still visible in the dropdown but when one of them is selected, the script automatically switches it to a different issue type, so the logic is partially working. I’m not sure what’s going wrong in Chrome.
Any tweaks to the script. My jira is on data center 9.12.19

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.security.roles.ProjectRoleManager

import static com.atlassian.jira.issue.IssueFieldConstants.ISSUE_TYPE

def issueTypeField = getFieldById(ISSUE_TYPE)

def projectRoleManager = ComponentAccessor.getComponent(ProjectRoleManager)

def availableIssueTypes = []
availableIssueTypes.addAll(["issue type1", "issue type2 etc"])

issueTypeField.setFieldOptions(availableIssueTypes)

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events