Automated Ticket Duplicates on Triggering Issue
Hello all!
I'm hoping someone maybe has run into this and could give some insight on how to resolve this issue.
The automation I have built out should only create a single instance of this ticket for the triggering issue.
The rule I have built is as follows:
- Trigger: Runs every 30 minutes. With a JQL search of: "issuetype = Onboarding AND "Start Date" >= -60d AND "Start Date" <= 2d AND status != Closed"
- Action: Re-fetch Work Item Data
- Condition: JQL Condition - IF work item matches JQL = "Type" = "New Employee"
- Condition: JQL Condition - IF work item matches JQL = "Computer Access?" = "Yes"
- Condition: Related Work Items Condition - Related Work Items = Linked Work Items - All Link Types - Condition: "None match specified JQL" - Matching JQL "summary ~ "Employee Hire - New Computer"
- Create new task within ONB project with summary of "Employee Hire - New Computer". Link newly created work item to trigger issue.
__________________________________
I've tried the following approaches, but either duplicate tickets are still created or no ticket is generated at all:
1. Changed the Related Work Item Condition
- Changed the condition from "If NONE" to "If SOME" using the same JQL currently configured.
- Result: No ticket is created if any linked ticket already exists, even when it is not the specific ticket I'm trying to prevent from duplicating.
2. Replaced the Related Work Item Condition with a Lookup Work Items action
JQL used:
```issue in linkedIssues("{{issue.key}}") AND summary = "Employee Hire - New Computer"```
2a. Added a Smart Values condition
```{{lookupIssues.size}} = 0```
- Result: No ticket is created.
- Automation log message: "A search during custom value definition found no issues."
I have a feeling that the related work item condition is not recognizing or seeing that there is a linked ticket with this summary but I'm not sure how to ensure that automation does identify that it already exists or does not. Has anyone run into this issue before? If so, I would appreciate any guidance on this!