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.

In this use case we assume that several issue types are using the same workflow.

If you have 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} = "New Feature" implies isInRole(%{system.currentUser}, "Product Managers"))


Adapt the expression to your needs!


Above expression explained:

Selected issue type for new issueExplanation
BugOnly if the current user is in role Developers or Software Testers, the issue can be created.
New FeautureOnly if the current user is in role Product Managers, the issue can be created.
Any other issue typeCan be created by any user independent of any project role.

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.