Restricting Issue Types
Jira issue type schemes are not very flexible, as you cannot limit the available issue types in a project. Typically, if someone has permission to create an issue in a project, they can create every issue type in the project's issue type scheme.
You can use Behaviours to restrict which issue types are available to different categories of users. On this page, we provide you with the following examples of restricting issue types:
Restricting available issue types based on user role
You can use the following example to restrict the issue types available to a user based on their role in the project. In this example, we restrict those in the Users role to only see Query and General Request issue types when they create new issues in a specific project. We also restrict those in the Developers role to only see Bugs, Tasks, and New Features.
setFieldOptions on the issue type field and restrict the available issue types accordingly.Step-by-step instructions
Test this behaviour
The following four outcomes are possible when testing this behaviour:
- Those in the Users role see Query and General Request
- Those that don't belong to either Users or Developers roles will not see any issue types
- Those in the Developers role see Bug, Task and New Feature
- Those in both the Users and Developers roles see Query,General Request,Bug, Task and New Feature
Restricting issue type to a single issue based on user role
In a different scenario to the above, where there is only one issue type allowed, we can set that issue type and lock the field.
You can use the following example to make sure members of the Users role can only set the issue type to Task and lock the field.
Step-by-step instructions
Test this behaviour
The following four outcomes are possible when testing this behaviour:
- Those not in the Users role will see all available issue types
- Those in the Users role will be restricted to the Task issue type only. `