How to Restrict Issue creation for a particular Issue Type based on roles in Jira Server
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
The content on this page relates to platforms which are not supported. Consequently, Atlassian Support cannot guarantee providing any support for it. Please be aware that this material is provided for your information only and using it is done so at your own risk.
Purpose
Only allow users in a certain role to be able to create an issue of a particular Issue Type. For example, in a project, you want to restrict the creation of Bug Issue Type to Developers. The solution below is specific to this scenario for simplicity.
Solution
- Install the 3rd party add-on Workflow Enhancer for Jira
- Verify that the bug issue type has its own workflow
- Go to the diagram view of the workflow
- Here select the create transition
- Go to the transition's validator
- Add a validator
- You will now see a new option called Universal Validator which comes from the addon installed
- here set the following as shown in the example below:
Expression: [roles]=/.*Developers.*/
Expression must evaluate to: True Message: Only Developers are allowed to create bugs
You need to change this as per our own developer role name.
- Save this and publish the workflow.
There are other apps that can be used to achieve this goal as well, such as Jira Workflow Toolbox and ScriptRunner for Jira. For the instructions on how to configure each of them, the following articles can be used for reference:
ScriptRunner for Jira - Restricting Issue Types
Jira Workflow Toolbox - Limit issue creation per role and issue type
If you need more information about each of these apps and how to configure them, please reach out to their respective vendors.