Versions Compared

Key

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


Panel

On this page

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



UI Text Box
sizemedium
typeinfo

Use case

Prevent issue creation when there is already another issue in the same project with the same value in a certain field.

In this use case let's suppose that we have a text custom field called Invoice, and we want to avoid this field's value to be repeated among issues of the same issue type in the same project.

This use case is based on the Prevent issue creation with the same field value with Validation based on JQL query.


Configuration

UI Steps


UI Step

Add the Logical validator to the "Create issue" transition of the desired workflow.


UI Step

Expression

*

Add the following expression:

Code Block
languagebash
linenumberstrue
count(issuesFromJQL("project = '" + %{issue.project.key} + "' AND issuetype = '" + %{issue.issueType} + "' AND Invoice = '" + %{issue_.cfnnnnn} + "'")) = 0


UI Text Box
typeinfo

%{issue_.cfnnnnn} is the field code for the custom field Invoice. You might need to update the expression accordingly to the custom field you want to use.





Screenshots

Image Added


Related use cases

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


Excerpt Include
DECADIS:Contact support
DECADIS:Contact support
nopaneltrue


Page properties
hiddentrue


JWT feature

Workflow function

Logical validator

Validation based on JQL query

Use case descriptionPrevent issue creation when there is already another issue in the same project with the same value in a certain field.
Parser functions

count()

issuesFromJQL()

Label



Page properties
hiddentrue



Status
Tech review

Status
colourGreen
titletododone

Style guide

Status
colourGreen
titletododone

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