Forums

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

Automation: Checking for if a SubTask with a specific name exists

LDTStudios
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!
June 15, 2023

-right now I have a automation rule where when a task gets transitioned, it automatically creates a set of subtasks.

-the issues is when someone transitions to and from this state it will create a duplicate subtask.

-Is there a good way to handle the creation of this duplicate subtask/ these subtasks. One idea is to check if there is already a subtask with that name, and if so do nothing.

I understand there is a way to check if ANY subtasks exist and do nothing - this will not work here as there are already other subtasks that exist as part of the task at this point.

thank you for your help

3 answers

0 votes
Mark Ahnell
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!
October 16, 2023

I solved this by creating a "Related issues condition" and setting Condition to "Are not present".

2023-10-16_12-57-30.png

0 votes
Mark Ahnell
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!
October 16, 2023

@LDT , I have the exact need.  I have a sub-task that gets created during a transition, but if the issue goes backwards and forward again, I dont want to create the same issue.  Did you ever get this working?

0 votes
Evgenii
Community Champion
June 15, 2023

Hi, @LDTStudios 

You can use JQL condition, like

issuefunction in subTasksOf(key = {{issue key}} AND summary ~ "text_you_are_looking"

LDTStudios
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!
June 15, 2023

ah thank you, I will take a look into JQL conditions. Its not something I have used before. I guess I will have to check if something exists - IF NOT then create as opposed to an IF NOT - then create rule?

Like Evgenii likes this

Suggest an answer

Log in or Sign up to answer