How to hide field "Issue Type" from the Create screen

Juliane Di Lascio July 3, 2014

Is it possible to hide the field Issue Type from the Create screen?

(We want the customer has to create an issue with exactly one issue type. Because there are many issuetypes in this list, we thought to hide this field and the issue will be created with the default issuetype (which we have set = default).

I have deleted it in the configuration of this screen, but when I cretae an issue it still appears.

5 answers

1 accepted

1 vote
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 3, 2014

Not without code. Jira needs to ask for the issue type because it's structural - it determines most of the schemes that the rest of the process will be using.

There's no way to restrict users to issue types, so you end up with no option to do this sort of thing.

You could try hacking the screen in the core code, or mess around with javascript, but there's nothing you can do off-the-shelf.

0 votes
mesa sisa June 18, 2020

this is how you can remove an issue type (and also add an issue type) from an project.

the cool thing is that the existing issues will not be affected but it is only prevented that users can choose the target issue type in "create issue" screen. works for me with Jira 8.5

please try out if you need that:

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.fields.option.OptionSetManager
import com.atlassian.jira.issue.fields.config.FieldConfigScheme
import com.atlassian.jira.issue.fields.option.OptionSet
import com.atlassian.jira.issue.IssueFieldConstants
import com.atlassian.jira.project.Project


def targetissuetypeID = "10001" //story
def projectKey = "MSA"

//get needed components
def itsm = ComponentAccessor.issueTypeSchemeManager
def opsm = ComponentAccessor.getComponent(OptionSetManager)
def pm = ComponentAccessor.projectManager

//set vars with required objects from user input
def proj = pm.getProjectByCurrentKey(projectKey)
def issueTypes = itsm.getIssueTypesForProject(proj)

//get fieldconfig scheme for target project. you should maybe check if scheme is not global so that other projects are not affected
FieldConfigScheme scheme = itsm.getConfigScheme(proj)

//issue types that can be seen in 'create issue' screen are stored as options
OptionSet options = opsm.getOptionsForConfig(scheme.getOneAndOnlyConfig())
def newoptionsArray = []
newoptionsArray = options.getOptionIds()

//remove target issue type
newoptionsArray.remove(targetissuetypeID)
itsm.update(scheme, newoptionsArray)

//add an existing issue type to project
//options.addOption(IssueFieldConstants.ISSUE_TYPE, targetissuetypeID)
//itsm.update(scheme, options.getOptionIds())

0 votes
Vishnukumar Vasudevan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 9, 2014

Also, you can try removing other issue types from your 'Issue Type Scheme' if possible.

0 votes
Marcus Silveira
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 3, 2014

You may also try using an Issue Collector instead of the Create Issue button.

This way you can specifiy the Issue Type you want previously and your users will have a customized create issue screen just for this.

Hope this helps

0 votes
Svante Gustafsson Björkegren
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.
July 3, 2014

Hi Juliane,

If your customers are ok with clicking a link to create an issue you may want to try out this URL:

https://<JIRA-Base-URL>/secure/CreateIssueDetails!init.jspa?pid=<project-id>&issuetype=<issue-type-id>

where:

<JIRA-Base-URL> is the, yep, JIRA Base URL to your instance

<project-id> is the ID for the project you want to create the issue in

<issue-type-id> is the ID for the Issue Type you want them to use

The URL will take the user to a create screen where Project and Issue Type fields are read-only.

There are some more info about Creating Issues via direct HTML links here

Would this work for you?

// Svante

Svante Gustafsson Björkegren
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.
July 3, 2014

and with this approach you can prefill as many fields as you like with the URL. It is all described in the provided link

Suggest an answer

Log in or Sign up to answer