Forums

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

Comparing lists to create a task only if it doesn't already exist

Michael Goodrich
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 16, 2024

Hi,

I have an automation that creates new tasks in an epic based on the value of a multi-select field (field is at the epic level). 

The problem I'm running into is that any change to the field duplicates tasks which already exist.  I'd like use an if statement to stop the creation of tasks if the task already exists, but because it's comparing lists it seems to be that any if condition is all or nothing rather than considering each item individually (I think). 

At a basic level, my creation automation is: 

When Value Change > For Each (item in list) > Create Task (for one department) > Create Task (for the other department). 

The two tasks have summaries that are exactly the same except for the first word which identifies whose task it is. 

I've tried several variations of if and compare conditions over the last few days. 

Most recently: 

For each: Smart Value (list field) > Lookup Issues (that have the same epic/parent) > If: Compare (if lookupissues.summary does not contain issue.field.value) then Create

 

But this automation seems to stop any creation altogether. 

 

Any ideas on a better route? 


Thanks!


1 answer

0 votes
Bill Sheboy
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.
January 16, 2024

Hi @Michael Goodrich -- Welcome to the Atlassian Community!

For a question like this, please post an image of your complete automation rule, images of any relevant actions / conditions / branches, an image of the audit log details showing the rule execution, and explain what is not working as expected.  Those will provide context for the community to offer ideas.  Thanks!

Until we see those...

From what you described, the created tasks are distinguished by their summary field text.  Perhaps there is an error in the JQL which looks for the tasks or the conditions which checks them to prevent duplication.  Seeing the entire rule and audit log will help to narrow that down.

Kind regards,
Bill

Suggest an answer

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

Atlassian Community Events