Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Identify Duplicate in Status and transition

Christina Evans
Contributor
June 27, 2024

I am having a difficult time figuring out how to get automation to recognize an issue with a duplicate summary, link it, and transition the duplicate.

I have an automation set on a different board (Board A) to generate an issue another board (Board B.) There are times people move issues back and forth through the workflow on Board A causing board B to have duplicates.

On Board B I would like to set an automation in "To DO" status that recognizes the summary lines are the same, links the issues, and transitions one to a Done status. 

Any thoughts?Screenshot 2024-06-27 103607.png

2 answers

1 accepted

0 votes
Answer accepted
Tommaso Gionfriddo _Teklada_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 27, 2024

Hi @Christina Evans ,

 

Current approach

There are quite a few small issues with your current approach, which is why it's not working.

Scheduled trigger

Assuming your scheduled trigger is set to run a JQL search, I think you have a slight misunderstanding of how to access the issues returned by the search.

When you run a JQL query as part of a scheduled trigger, all the actions within the automation rule will run for each issue, as if the automation had been triggered for an individual issue. This means you do not need to use any branches.

Lookup issues

I can also see that you have referred to both {{lookupIssues}} AND {{issue}}. {{lookupIssues}} is only set when you use the Lookup issues action. Did you mean to add a Lookup issues action before the branch?

Most recently created issue

The most recently created issue can only be accessed when you have created an issue during the execution of the automation rule. In your current case, the most recently created issue will always be empty.

Logic/Trigger

Your current approach is based on checking periodically checking for duplicates. While there's no reason this can't work, it might make more sense to instead for duplicates each time a new issue is created. This would allow you to simplify the logic a little bit

 

Suggestion

Overall however, I think you a solving a problem which doesn't need to exist.

Instead of closing these duplicate issues, why not add logic to your existing automation to ensure duplicates are not created? Before creating the issue in board B, check whether another issue in board B already has the same summary, or better yet check whether the issue in board A has already been duplicated to board B, perhaps via an issue link.

I'd be happy to provide some further detail on the specifics of the configuration, but would recommend first that you give the above another try. If you get stuck, please provide a screenshot of the issue cloning automation.

 

2 votes
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.
June 27, 2024

Hello @Christina Evans 

What are the details of your Scheduled trigger? Are you running a JQL to select issues in that trigger?

Next, there are numerous problems in your rule. Your first problem is that your Branch step is not valid.

The {{lookupIssues}} smart value is populated by a Lookup Issues action. Since you don't have a Lookup Issue action, your smart value has no data.

Another problem is your step to link to most recently created issue. "Most recently created issue" is a reference to an issue created within the same automation rule, but this rule is not creating any issues.

 

You might want to consider going back to the automation rule that is creating the duplicate issues and modifying it so that it won't create the duplicates, eliminating the need for this second rule.. Can you share the details of that rule with us?

 

Christina Evans
Contributor
July 3, 2024

That is a good point. I need to prevent duplication because users sometimes pull the issue backward in the workflow, then retrigger the issue creation.  This is the flow I have to create the issue. Any thoughts on blocking duplicates? I do have a unique link set between the issue types.Screenshot 2024-07-03 095959.png

Tommaso Gionfriddo _Teklada_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 3, 2024

This looks good @Christina Evans ,

Next, before you create the issue, add a Related issue condition.

Configure as follows to achieve your desired result (although there are other possible ways to do it). Make sure to select the specific link type you are using.

If you encounter problems, try flipping the link direction in the condition. Links are directional, Is blocked by -> Blocks.

Screenshot 2024-07-03 at 18.19.22.png

Like Christina Evans likes this
Christina Evans
Contributor
July 3, 2024

Thank you a bunch!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
atlassian, atlassian government cloud, fedramp, webinar, register for webinar, atlassian cloud webinar, fedramp moderate offering, work faster with cloud

Unlocking the future with Atlassian Government Cloud ☁️

Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.

Register Now
AUG Leaders

Atlassian Community Events