On this page
Use case
In Jira it is not possible to restrict the creation of issues with specific issue types to certain user/ user groups/ project roles.
In the following use case, we restrict the issue creation depending on the selected issue type: Each issue type can only be created by a certain project role. For this, we add the validator to the create transition of the workflow.
In this use case we assume that several issue types are using the same workflow.
If you one workflow for each issue type, check out the corresponding use case.
Configuration
Add the validator to the create transition of the desired workflow.
Expression
Enter the following expression:
(%{issue.issueType} = "Bug" implies (isInRole(%{system.currentUser}, "Developers") or isInRole(%{system.currentUser}, "Software Testers"))) and (%{issue.issueType} = "Improvement" implies isInRole(%{system.currentUser}, "Developers")) and (%{issue.issueType} = "New Feature" implies isInRole(%{system.currentUser}, "Product Managers"))
Adapt the expression to your needs!
Above expression explained:
Selected issue type for new issue | Explanation |
---|---|
Bug | Only if the current user is in role Developers or Software Testers, he can create that issue. |
Improvement | Only if the current user is in role Developers, he can create that issue. |
New Feauture | Only if the current user is in role Product Managers, he can create that issue. |
Any other issue type | Can be created by any user regardless of the project roles he part of. |
Error message
Enter the following expression in basic text mode:
You are not in the right project role for creating a new issue with the selected issue type "%{issue.issueType}".
Screenshots
Related use cases
If you still have questions, feel free to refer to our support team.