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

Automation for Jira - Create subtasks if they don't already exist

Geoff Robles March 27, 2020

I have a task that sets the default story Description and creates several subtasks when an issue is created. It's working great for the most part. However, when a user CLONES an issue and mistakenly selects the Clone Subtasks option, it clones all of the existing subtasks plus creates a new set of subtasks since the story is also new.

How do I add a condition that checks for the existence of subtasks and only does the next action if the subtasks do not exist? Annotation 2020-03-27 113505.png

Attaching what I have so far, but I'm getting an error:

"Parent issue ID: '203234' / Key: 'ABC-76' can not be sub-task. (issuetype), 2: Parent issue ID: '203234' / Key: 'ABC-76' can not be sub-task. (issuetype)"

2 answers

2 accepted

3 votes
Answer accepted
Gikku
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 27, 2020

Hi @Geoff Robles 

You can check if any sub-tasks exists or not using the below condition.

Subtasks not present.png

If you want to search for any particular sub-task exists or not using the summary, you can follow below approach.

Subtask jql match.png

Geoff Robles March 31, 2020

Thanks! This worked!

Culinary Change Management June 14, 2023

@Gikku The qualifier I want to put on this automation is not a matching JQL, its a matching subtask owner. Is there a way to execute that?

2 votes
Answer accepted
Parvaneh Zand
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 28, 2020

Hi @Geoff Robles ,

In addition to above answer, you can add condition on link issue type.

The automation will not work if created issue is a Cloner.

clone.jpg

Geoff Robles March 31, 2020

Thanks! This worked also

Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events