Forums

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

How can I avoid duplicate issues from being created with automation?

Greg Mihailides
Contributor
March 13, 2024

Hello all, 

I'm looking for help with an issue that we've come across after setting up a few different related automations. Below is an example of an automation we have set up where when we add a particular user into the 'additional assignee' field, it triggers an automation to create an issue in that team's separate project and pulls in certain information from the trigger issue. This has been working well so far, until we created a similar rule for a different team (with a different project). The logic is the same but the person for the additional assignee field is different and the target location of that new issue with selected information is a different project. All new issues are being created, however, if we add the two separate assignees to that field at different times then the first person we added will get a second/duplicate issue created in their project since the automation triggers by changes to the field. 

I am looking for an addition/edit to the logic that could search for duplicates and not create the issue if it has already been created. Some of the other examples I've found searching in the community aren't quite what I'm looking for and despite trying different aspects of the 'related conditions' 'IF' option, I haven't been successful. 

Does anyone have suggestions for updating the logic to search for duplicates and block the issue creation from happening when it ID's one already created? Thanks! 

Screenshot 2024-03-13 at 1.55.42 PM.png

2 answers

1 accepted

0 votes
Answer accepted
Kalyan Sattaluri
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.
March 13, 2024

Hello @Greg Mihailides 

I am not entirely sure what is the problem statement. Are you saying that you want to create new issues only the first time "Greg" is added to Additional Assignee and not every time rule is getting triggered?

If so, I think you could just check if {{addedfieldChange.values}} is equal to Greg and only then create the new issue. Some thing like below screenshot.

If this is not the problem statement, please clarify..

image.png

Kalyan Sattaluri
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.
March 13, 2024
Greg Mihailides
Contributor
March 14, 2024

Thanks, @Kalyan Sattaluri this worked well. Appreciate you taking the time to help out! 

Like Kalyan Sattaluri likes this
2 votes
Mikael Sandberg
Community Champion
March 13, 2024

You could add a Lookup Issue component that looks for similar issues and only if the size returned is 0 then continue to create then new issue.

I have a similar rule that closes duplicate issues if the lookup issue finds 1 or more issues with the same Id in the description:

Screenshot 2024-03-13 at 2.53.00 PM.png

Greg Mihailides
Contributor
March 14, 2024

Thanks, @Mikael Sandberg this was a helpful suggestion. I went with Kaylan's for my project, but this could have worked as well. 

Like Mikael Sandberg likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events