Forums

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

Is there a way to hide a request type in Jira Software?

Jeramy
Contributor
May 9, 2023

Recently we had to open a Service Project up more to our internal employees and now most of them are creating issues in Jira Software instead of through the portal. However, they get confused when they see too many Request Types in Jira Software.

I know how to hide an issue's request type from users in the Portal. However, is there a way to hide that same request type in Jira Software? 

Thank you.

1 answer

0 votes
David Harkins
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 31, 2023

The following script can be added as a behaviour:

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.security.roles.ProjectRoleManager
import com.onresolve.jira.groovy.user.FieldBehaviours
import groovy.transform.BaseScript
import static com.atlassian.jira.issue.IssueFieldConstants.ISSUE_TYPE

@BaseScript FieldBehaviours fieldBehaviours

def projectRoleManager = ComponentAccessor.getComponent(ProjectRoleManager)
def allIssueTypes = ComponentAccessor.constantsManager.allIssueTypeObjects
def issueTypeField = getFieldById(ISSUE_TYPE)
def availableIssueTypes = []
availableIssueTypes.addAll(allIssueTypes.findAll { it.name in ["Incident","Question","Improvement","Problem","Task" ] })

issueTypeField.setFieldOptions(availableIssueTypes)
Could add some more logic to get the current users groups, if they are in group 'admin' allow more issue types, otherwise allow none.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
8.20.11
TAGS
AUG Leaders

Atlassian Community Events