Automatic Task & Subtask in a new Epic

Jana Jäger
Contributor
September 21, 2023

When creating an Epic in my Board (Software Project), I want to automatically create one task with ten subtasks.

Currently it is only possible for me to automatically create an Epic with a task or an Epic with a subtask.

When I try to automatically create an Epic with task and subtask, either the task or subtasks are missing or created outside the Epic.

I tried various variants before (even according to working solutions in other feeds but nothing works for me with Jira Cloud).


Any ideas?

 

Thank you in advance

Jana

 

in the screenshots you can find two of various different ways I tried.

 

1.png2.png

3 answers

2 accepted

0 votes
Answer accepted
Tharaka_Hettiarachchi
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.
September 22, 2023

Hi @Jana Jäger ,

Your Rule is correct. but you need to select 'All created issues' instead of 'Most Recently created issue'.

Screenshot 2023-09-22 at 17.14.39.png

 

Cheers!

Jana Jäger
Contributor
September 24, 2023

Great, thank you for your help @Tharaka_Hettiarachchi - it works now.

Any idea how I get to have the same assignee in the task & subtask as well? It doesn't work with Assigneee "Copy from Epic".

 

Thank you again

Jana

Tharaka_Hettiarachchi
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.
September 24, 2023

You need to set 'Copy from current issue' in Task and Sub tasks as well

Jana Jäger
Contributor
September 25, 2023

@Tharaka_Hettiarachchi I set it to "Copy from Trigger Issue" and it worked. Thank you so much.

Jana Jäger
Contributor
September 25, 2023

@Tharaka_Hettiarachchi unfortunately it's not completely solved.

It does work now but now a subtask always gets created when creating a task no matter the Project Type & I only need the subtask creation once after creating the epic (not always when adding a task).

 

Any idea?

0 votes
Answer accepted
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.
September 21, 2023

Hi @Jana Jäger 

Your rule is very close to what you need...the missing part is a branch on most-recently-created-issue.  Please try this adjustment to add the subtasks:

  • trigger: issue created
  • action: re-fetch (I always add this after the Issue Created trigger as the rule can run so fast the later conditions may fail.)
  • condition: issue type is epic and project type equals...
    • action: add task
    • branch: on most recently created issue
      • action: create subtasks...

Kind regards,
Bill

Jana Jäger
Contributor
September 22, 2023

Hi @Bill Sheboy thank you so much for your help. I can follow your explanation quite well but I guess I missed some detailed point.

 

It does work now but now a subtask always gets created when creating a task no matter the Project Type & I only need the subtask creation once after creating the epic (not always when adding a task).

 

Could you please be so kind in having a look what I could change?1.png2.png

3.png

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.
September 22, 2023

My mistake, as I thought you had another path/case for when tasks were created without an epic.

I updated the rule I suggested to simplify it, removing that extra part.  Please compare and update your rule accordingly and re-test it.  Thanks!

Jana Jäger
Contributor
September 24, 2023

Great @Bill Sheboy . Thanks again for your help. I didn't see any differences but it worked when changing to "all type of issues".

Jana Jäger
Contributor
September 25, 2023

@Bill SheboyIt's not solved after all. Any ideas what to do when I only want those subtasks to be created in this specific case?

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.
September 25, 2023

Please post images of your current, complete rule and of the audit log details showing the rule execution.  Those will provide context to explain what you are observing.

Jana Jäger
Contributor
September 25, 2023

1.png2.png3.png5.png4.png

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.
September 26, 2023

First, let's simplify/shorten your rule to see how that helps...

The action to Create Subtask can add multiple subtasks at a time, so try collapsing your 5 subtask actions into 1.

Next, where you branch to All Created Issues, please change that to Most Recently Created Issue, as there will only be one.

Then retest to see what happens.  Thanks!

Jana Jäger
Contributor
October 8, 2023

@Bill Sheboy it works if I only want to create one task and then subtasks, not when I want to create two tasks and then subtasks.

That's fine by me.

 

Thank you so much.

Jana Jäger
Contributor
October 9, 2023

@Bill Sheboy Now these subtasks always get created when creating a new task manually. The workflow should be: New Epic -> one automatic task -> several automatic subtasks

This works but when I create another task manually, these subtasks get created as well. Any ideas what to do about that?

 

I hope it's okay that I continue asking you questions like that. I really appreciate your help.

 

Thank you

Jana

rule_2.pngrule_1.png

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.
October 9, 2023

You have an Else-If after the block testing for epic creation, and so it is adding subtasks for the newly created task.  If you do not want those, remove the Else-if and additional subtask creation.

And if for the epic you want to create 2 tasks, you just need 2 blocks: one for each task.

Jana Jäger
Contributor
October 11, 2023

awesome, thanks @Bill Sheboy 

Like Bill Sheboy likes this
0 votes
Akash Kumar Gupta
Contributor
September 21, 2023

Hi @Jana Jäger - You need to write two automation rules. First one is to create a task and add a label to that task. Then write the second rule to create subtasks and use the same label as condition for this rule.

You can use any other field if you don't want to use label in the condition of the second rule.

 

-Akash

Jana Jäger
Contributor
September 24, 2023

thank you @Akash Kumar Gupta - it worked in a different way as well which I did since I prefer to have one rule.

Like Akash Kumar Gupta likes this

Suggest an answer

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

Atlassian Community Events