Forums

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

How do I create Automation to create Epics>Tasks>Subtasks within a Jira Project Template?

Connor Rodriguez January 8, 2025

I'm trying to use Automation to create Epic>Task>Sub-Tasks and when I run the rule I only see the Epic>Task issues create. See screenshots as to how I set it up based on this thread but the Sub-tasks won't create. Please help! What am I doing wrong?

 

 

Capture.JPG

Capture1.JPG

 

 

https://community.atlassian.com/t5/Jira-Work-Management-Questions/Automation-Epic-gt-Tasks-gt-Sub-tasks/qaq-p/2423371

2 answers

1 accepted

1 vote
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.
January 9, 2025

Hi @Connor Rodriguez -- Welcome to the Atlassian Community!

After you create the new Task, branch to the Most Recently Created Issue rather than to the Current issue.  Then the subtasks will be added with the new Task as their parent.

Kind regards,
Bill

Connor Rodriguez January 9, 2025

@Bill Sheboy Thank you for the suggestion, and I made that update, but the sub-tasks issues are not still generating. Could there be some wrong with the Re-fetch Issue data condition or perhaps the value I have in the parent issue field for the sub-tasks? 

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.
January 9, 2025 edited

Reading your original rule images, I notice some things that would cause problems:

Lists use a 0-based index in rules, and so the parameter to the get() should be a 0 and not a 1.  However, that is not needed when the branch is changed. 

Assuming you are trying to add the issues and tasks under the trigger issue, please try this one:

  • trigger: manual
  • condition: issue type equals Epic
  • action: create issue, setting the parent to {{triggerIssue.key}}
  • branch: to most recently created issue
    • action: create issue (or subtask), setting the parent to {{issue.key}}
    • ...

Once the rule is inside the branch, {{issue}} refers to that issue and so the {{createdIssues}} smart value is not needed.

 

If instead you are also trying to copy the trigger issue, please let me know.

 

Connor Rodriguez January 13, 2025

@Bill Sheboy This was very helpful. I ended up removing the manual trigger and replacing it with a status change trigger. But using issue.key worked like a charm, and so did using most recently created issue. It seems to be working well. I really appreciate your help on this!

Like • Bill Sheboy likes this
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.
January 13, 2025

Awesome; I am glad to learn it is working!  Please consider marking this question as "answered" to help others with a similar need find solutions faster.  Thanks!

0 votes
Connor Rodriguez January 8, 2025

@Fernando Eugênio da Silva Can you help here? I got most of this from your previous instructions. 

Fernando Eugênio da Silva
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 9, 2025

Hey @Connor Rodriguez , thanks for bring me here.

Your automation structure is kind of different of the automation rule presented in the other post.

If you want to create an Epic > Tasks > Subtasks in the same rule you need to have a Create Issue event in your rule to save your epic as "EpicKey" variable.

It should be like this:

  • Create Issue Action > Issue Type Epic
    • Create variable with smartvalue: {{createdIssue.key}}
      • Create Issue Action > Issue Type Task> Set 'Parent' with the variable name created in the step above
      • Create a variable to save your task key using this smartvalue: {{createdIssues.get(1).key}}
        • Create Subtask Action > Set 'Parent' for your Subtask the variable created with the smartvalue {{createdIssues.get(1).key}} because this is your Task created key

Could you try these steps in the same rule to see if it works?

Let me know anything

Fernando

Fernando Eugênio da Silva
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 9, 2025

But if you already have the Epic created, then you need to change a litle bit your automation structure, because you already have Epic Issue Key.

The steps described here: Solved: Automation: Epic > Tasks >Sub-tasks is really about create Epic > Tasks > Subtasks in the same automation rule.

Connor Rodriguez January 13, 2025

@Fernando Eugênio da Silva This is very helpful. I used a lot of what you provided in the previous post! Thank you for your help! I will probably need it again in the future.

Like • Fernando Eugênio da Silva likes this
Fernando Eugênio da Silva
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 13, 2025

Any time, @Connor Rodriguez !!

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, loom, AI, meeting recording, community

[NEW] Record your meetings with Loom

Welcome to great meetings, with less work. Automatically record, summarize, and share instant recaps of your meetings with Loom AI.

Learn more
AUG Leaders

Atlassian Community Events