Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Panel

On this page

Table of Contents
maxLevel2
exclude(On this page|Use case).*
stylecircle
typeflat
separatorpipe



UI Text Box
sizemedium
typeinfo

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.

UI Text Box
typenote

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

UI Steps


UI Step

Add the validator to the create transition of the desired workflow.


UI Step

Expression

Enter the following expression:

Code Block
(%{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"))


UI Text Box
typeinfo

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.




UI Step

Error message

Enter the following expression in basic text mode:

Code Block
linenumberstrue
You are not in the right project role for creating a new issue with the selected issue type "%{issue.issueType}".





Screenshots



Related use cases

Page properties report
firstcolumnUse case
headingsJWT feature, Workflow function, Parser functions, Label
sortByTitle
cqllabel = "use-case-workflow" and ancestor in ("32215720","27066629")


Excerpt Include
DECADIS:Contact support
DECADIS:Contact support
nopaneltrue


Page properties
hiddentrue


JWT feature

Workflow function

Logical validator

Parser functionsisInRole()
Label



Page properties
hiddentrue



Status
Tech review

Status
colourGreen
titledone

Style guide

Status
titletodo

Status
titletodo
Status
colourYellow
titleReady for review
Status
colourGreen
titledone
Status
colourRed
titleflagged