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

automation: tasks and subtasks creation

Martin Kovalcik June 9, 2022

Hi,

I need to create tasks and subtasks of these tasks by using automation when the user creates epic.

I was able to create tasks in epic, but I don't know how to create subtasks in these tasks.

Any help?

3 answers

3 accepted

Suggest an answer

Log in or Sign up to answer
2 votes
Answer accepted
Kalin U
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 9, 2022

Hi, Martin.

You can accomplish the creation of tasks and sub-tasks to a single epic in a single automation rule by using the branch component "For Most recently created issue.

Make sure to set the field "Epic Link" for tasks to the parent Epic. Sub-tasks are linked to tasks only, not to epics.

Here is a visual representation of an actual rule that creates tasks and subtasks to a newly created epic:

Automation.png

Sergei Gridnevskii
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 9, 2022

What if he is in a big organization and someone creates another issue at exactly same time?

Like # people like this
Kalin U
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 9, 2022

Good point. I would try with "For Current issue" instead of "Most recently created issue".

Like vasanth likes this
Martin Kovalcik June 9, 2022

@Kalin U 

how will it look (I mean those branches), when I need to create more than one task in epic?

Like vasanth likes this
Kalin U
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 9, 2022

The rule structure I use is the following:

1. If it is an epic,

2. then create task 1 and edit field Epic Link to "Copy from Current issue",

2.1. then branch on task 1 - create sub-task 1a, sub-task 1b, etc.

3. Then create task 2 and edit field Epic Link to "Copy from Current issue",

3.1. then branch on task 2 - create sub-task 2a, sub-task 2b, etc.

 

Here is an example of points 3 and 3.1:

Automation 2.png.jpg

Sergei Gridnevskii
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 9, 2022

You see it becomes more and more complex and I hate rules that do not fit on one screen.

Splitting rule to several rules makes it much more easier to support. And I think atlassian loves it because it has to run a rule on one server while it can run 10 rules on 10 different servers in cloud and finish the whole task 10 times faster.

Like vasanth likes this
Martin Kovalcik June 9, 2022

@Kalin U 

your idea worked for me, but only when I used "Most recently created issue" for branches.

When I used "Current issue", the subtasks were created under epic and not under tasks created in epic.

1 vote
Answer accepted
Sylvain Martin-Faltot
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 9, 2022

Hello Martin, 

 

My approch on your problem would be to create a second automation that triggers on the creation of a task and make sub-task here.

 

Have a good day.

0 votes
Answer accepted
Sergei Gridnevskii
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 9, 2022

If you use Automation for Jira - you need second rule that will trigger on issue creation. Check summary and create subtasks.

Martin Kovalcik June 9, 2022

Thanx for quick response @Sergei Gridnevskii 

 

But how do I distinguish in the second rule whether the task that was created was created by automation or by the user?

Like vasanth likes this
Sergei Gridnevskii
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 9, 2022

Well the easiest way - by comparing the Summary of the ticket with a predefined string. This of course make it possible that someone uses this string and triggers your rule - but you may be creative, e.g. by using something like 

[Autotask785] Check server logs

and then search for [Autotask785] in Summary

If you do not like it - create a custom field like a checkbox "Automation" and fill it when you create tasks. In second rule check if it is empty and continue if not.

Like # people like this
Marcin Szymkowiak June 9, 2022

You can also use a different field for that. 

Labels for example or even a custom field. 

Martin Kovalcik June 9, 2022

I found this option as well:

image.png

Like Sylvain Martin-Faltot likes this
Martin Kovalcik June 9, 2022

I like the idea of triggering another rule for subtasks creation.

I managed to do it by one rule only, so it is triggered by itself.

image.png

Like Kalin U likes this
TAGS
AUG Leaders

Atlassian Community Events