Details
Description
Right now, it's not possible to limit the issue types available on the create/edit issue screens using behaviours the way you can with priorities.
From user's report:
Trying to hide some Issue Types using Behaviors, but not able to make it to work.
Here is the snippet that I'm trying (script added to Issue Type field in behavior as well as Initialiser), and I've verified the mapping as well:
import com.atlassian.jira.component.ComponentAccessor import static com.atlassian.jira.issue.IssueFieldConstants.ISSUE_TYPE def issuevalue = getFieldById("issuetype") log.warn("The Current Issue Type ID is " + issuevalue.getValue()) log.warn "IT:" + issuevalue def constantsManager = ComponentAccessor.getConstantsManager() def allowedIssueTypes = constantsManager.getAllIssueTypeObjects().findAll { it.name in ["Bug", "Request"] } .collectEntries{ [(it.id)]} log.warn "Issue Types: " + allowedIssueTypes getFieldById("issuetype").setFieldOptions(allowedIssueTypes)
Attachments
Issue Links
- relates to
-
SRJIRA-2352 Issue Type Field inline edit is not working
-
- Done
-
-
SRJIRA-2738 Behaviours don't preset or lock issue type field
-
- Done
-
-
SRJIRA-2788 Issue Type Field does not respond to setFormValue or setRequired (etc) in Behaviours
-
- Done
-
-
SRJIRA-2836 formField.setDescription() doesn't work on Issue Type field
-
- Done
-