Automation : Close Duplicate tickets created at same time with same summary
Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.
Summary
This Knowledge Base article outlines how to close duplicate tickets created simultaneously with identical summaries.
Such duplicates often occur when an alerting platform generates multiple alerts at once, triggering API calls that create redundant Jira issues. The article provides steps to efficiently manage and close these duplicates, streamlining the workflow.
Solution
- Create an automation that will start when an issue is created as a trigger
Add a Lookup Issues action with the following JQL query to find potential duplicates:
summary ~ "\"{{issue.summary}}\"" AND Status!= OPEN
Add a condition to check if multiple issues exist with the same summary:
{{lookupIssues.size}} > 1
Insert a Log Action to capture the first duplicate ticket using this smart value:
Code{{lookupIssues.first}}
Add a For Each Branch action to process each duplicate. Use the following JQL to specify the issue:
Codeissuekey = "{{lookupIssues.first}}"
Within this branch, add a condition to verify the ticket is not in a Resolved or Closed status:
Code BlockStatus does not Equal Resolved
Finally, add an Action to close or resolve the duplicate issue.
- Sample JSON File for an Automation Rule
>>> DuplicateIssues.json - How to Import Automation Rules File to Jira
In Jira settings, select System > Automation rules. You’ll be navigated to the global Automation screen.
In the top right corner, select … > Import rules.
Select Upload JSON or drag and drop your JSON file to the area inside the dotted line.