Forums

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

Automation: Epic > Tasks >Sub-tasks

Wilcor G July 18, 2023

I am trying to automate our monthly tasks where every 1st of the month the following will be created:

 EPIC > MMM YYYY Monthly tasks

Task > Monthly Task 1

 - Subtask 1

- Subtask 2

- Subtask 3

Task > Monthly Task 2

 - Subtask 1

- Subtask 2

- Subtask 3

 

I was able to create the automation where the epic is scheduled but the sub-tasks are going under the EPIC and the Tasks are created outside the epic. Below is the SS of the automation and the results:

Screenshot 2023-07-18 at 7.01.14 PM.png

Thanks!

1 answer

1 accepted

1 vote
Answer accepted
Fernando Eugênio da Silva
Community Champion
July 18, 2023

@Wilcor G , Welcome to the Atlassian Community!

 

There's no easy way to explain this, but I will try to leave all steps that you need to follow to get your result.

 

1- Creating your Epic

  • To have the current month/year in Epic Summary, you need to fill the summary with this value: {{now.format("MMMM,YYYY")}} Monthly Tasks
    • What this does? This will create your Epics like this: July,2023 Monthly Tasks and automatically the next month will be August,2023 Monthly Tasks
  • After the action created epic, create a variable with this smartvalue: {{createdIssue.key}}
    • This variable will record the key for the Epic Issue and we gonna use him to set Epic Link for the tasks

Screenshot_127.png

2- Creating Tasks

  • After the variable to record the Epic Key add a new action to create a task issue, you need to select the field 'Epic Link' and inside this field paste the variable you've created to record epic key

Screenshot_128.png

  • Add a new action to create your second task monthly and repeat the step for Epic Link field pasting the variable to get Epic Key

This is our automation untill now

Screenshot_129.png

Just for safe reasons (delay), after the second task creation I added a branch for 'Most recently created issue' and inside the branch I added a re-fetch action

Screenshot_130.png

3- Creating Sub-tasks

After the Branc for Re-fetch issues add your subtasks actions. I added 6 create sub-tasks actions.

  • For the 3 first inside the Parent Issue field you select this variable: {{createdIssues.get(1).key}}
    • This is the variable issue key for the first task created for your rule

Screenshot_131.png

  • For the 3 last sub-tasks actions, in the Parent Issue field you need to add this second one variable: {{createdIssues.get(2).key}}
    • This is the variable issue key for the second task created for your rule

Screenshot_132.png

It works pretty well for me. You can try and back with your feedback of this answer :)

Regards,

Fernando

Wilcor G July 18, 2023

THANK YOU @Fernando Eugênio da Silva ! It works like a charm :) 

Suggest an answer

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

Atlassian Community Events