Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to Avoid Duplicate Stories ?

Rita Arellano
Contributor
January 22, 2025 edited

Hi everyone, 

I am trying to manually trigger the automation from the story. I am able to create the first story with the summary = RED. However, when I manually trigger the story again I get duplicates, meaning another story with the summary = RED, even though another story with that same summary already exists. Please see my automation rule: 

Rule explained. 
1. When going into a story that is linked to the epic and selecting the "Manual Trigger"
     a. If issuetype = story
     b. And there is more than 1 Fix Version for the epic

2. For the epic that is linked to the story check for:
      a. any issue linked to the epic that is a story
      b. Condition - summary must not = "RED"   (This is the exclusion - meaning if an issue with the summary "RED" exists do not proceed

The reason I branch to the epic, is because I need to create the story under the epic. 

     c. create story 
ONE.jpg TWO.jpg

1 answer

1 accepted

5 votes
Answer accepted
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 22, 2025

Hello @Rita Arellano 

I think your intention is for the condition if summary=RED to be applied to the issues found by the Lookup Issues action. Is that correct?

If so, that is not what is actually happening. The actions and conditions inside of a branch will be applied to the issues of the branch unless directed otherwise 

In this case your branch is For parent so the condition is applied to the parent.

Instead of using that branch I would:

1. Put a second condition after the trigger to confirm the trigger issue has a parent Epic

2. Use a Lookup Issues action to execute the same JQL you have currently but adding to it and summary~RED 

3. Add an advanced compare condition for {{lookupIssues.size|0}} equals 0

That will confirm that no sibling issues with the summary containing RED exist.

4. And lastly have the action to create the issue.

Rita Arellano
Contributor
January 22, 2025

Hi @Trudy Claspill  thanks so much, I did add the {{lookupIssues.size|0}} and in addition I just removed the branch all together and now it seems to be working: 

IT.jpg

2.jpg

Like Trudy Claspill likes this

Suggest an answer

Log in or Sign up to answer