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.
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.
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())
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Also, you can try removing other issue types from your 'Issue Type Scheme' if possible.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
and with this approach you can prefill as many fields as you like with the URL. It is all described in the provided link
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.