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:

    Code
    issuekey = "{{lookupIssues.first}}"
  • Within this branch, add a condition to verify the ticket is not in a Resolved or Closed status:

    Code Block
    Status 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  
  1. In Jira settings, select System > Automation rules. You’ll be navigated to the global Automation screen.

  2. In the top right corner, select > Import rules.

  3. Select Upload JSON or drag and drop your JSON file to the area inside the dotted line.




Last modified on Dec 23, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.