On this page
Use case
This use case ensures, that users cannot create new issues if an issue of the same type and summary already exists in the project.
Configuration
Add the Validation based on JQL query to the Create transition of the desired workflow.
JQL
project = %{issue.project.key} AND type = %{issue.issueType} and summary ~ %{issue.summary}
Validation
Choose Number of issues returned by the JQL query satisfies a logical expression
Expression
#the number of issues returned by the query is temporarily stored in the field temporaryNumber1 {issue.temporaryNumber1} = 0
Error message
There already exists a %{issue.issueType} with the summary: %{issue.summary}
Error message with displaying issue key of existing issue
You can also display the issue key of the already existing issue so that you can directly navigate to that issue.
Make sure that the parsing mode is set to Advanced.
"There already exists a " + %{issue.issueType} + " with the summary \"" + %{issue.summary} + "\": " + first(fieldValue(%{issue.key}, issuesFromJQL("project = " + %{issue.project.key} + " AND type = " + %{issue.issueType} + " and summary ~ \"" + %{issue.summary} + "\"")))
This might not work for issues where the summary contains special characters since the default search will be performed as a fuzzy search.
You can perform an exact search, however, if you use the following syntax: "\"%{issue.summary}\""
project = %{issue.project.key} AND type = %{issue.issueType} and summary ~ "\"%{issue.summary}\""
Screenshots
Related use cases
STAFF PICKUse case JWT feature Workflow function Parser functions Label Assignee may only have a restricted number of assigned issues Prevent creation of issues with a duplicate summary Prevent issue creation with the same field value
If you still have questions, feel free to refer to our support team.