Automation - Create Epic and Sub-tasks

Kevin Drescher February 22, 2023

Hello,

 

I am trying to achieve basically this topic:

https://community.atlassian.com/t5/Jira-Software-questions/Automation-Create-Epic-Stories-and-Sub-tasks/qaq-p/1803339

only difference is I dont have Storys, I just want to create sub-tasks to an epic. I tried to use the solution of this topic but I must have done something wrong.

 

Bildschirm­foto 2023-02-22 um 16.52.46.pngBildschirm­foto 2023-02-22 um 16.52.32.png

3 answers

1 vote
Somnath Patil
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.
February 22, 2023

Hi Kevin,

 

As per my understanding, you cannot directly create Sub-task under Epic. You need to create Task or Story under Epic and then under Story you can create Sub-task.

0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 22, 2023

Hello @Kevin Drescher 

Welcome to the Atlassian community.

In addition to what the others have said...

The reason for the error in your automation rule is improper use of the Branch component.

When you use "For Epic" what you are asking the rule to do is to shift focus to the parent Epic of the issue the rule is currently executing against.

Since the rule is triggered on a Schedule, and I assume that the trigger does not include a JQL statement, there is no issue from which the branch can shift to a parent Epic.

You can't use that branch to take action against the Epic you just created.

As shown in the Answer in the post you referenced, your branch would have to be defined thus:

branch: on JQL with key = {{createdIssue.key}}

Screen Shot 2023-02-22 at 8.40.18 AM.png

0 votes
Diogo Teles
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.
February 22, 2023

Hi, welcome to the community!

I can't see the details on the create sub-task action from the screenshot. But if you are trying to create a sub-task issue type with the epic as a parent, it is not possible. 

Epics can have child issues, but there are main-level issues, which then will have their own subtasks. 

Issue hierarchy by default is

-Epic Issue

     - Issue (e.g. Story)

                          -Sub-Task issue

 

If you do not have the "Story" issue type in the project, you can create other issue-level issue types that may be available (e.g. Task) using the Epic as a parent. 

Check what issue types you have available in the project. You should have Epic and some others. If an issue type has a "sub-task" tag in front of it, then it can't be created with epic as a parent.

The image below shows the Sub-Task and Task issue types on a project. In this case, you could use automation to create a "Task" with the new epic as a parent, but not a "Sub-task"

Screenshot 2023-02-22 160239.png

Kevin Drescher February 22, 2023

Thank you for clarifying. How would I bind a Task to an epic in Automation then?

Diogo Teles
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.
February 22, 2023

Here is what I used in a test project to create an epic and a child task on a scheduled trigger (I used generic names, summaries and descriptions with timestamp {{now}}  ):

 

Rule Map:

Screenshot 2023-02-22 170541.png

Detail on creating Epic Action:

Screenshot 2023-02-22 170658.png

Detail on creating Task action (child issue to the epic)

Screenshot 2023-02-22 170822.png

Like Trudy Claspill likes this
Kevin Drescher February 23, 2023

Hello again,

 

I just tried this and got this error which does not make any sense?

 

Bildschirm­foto 2023-02-23 um 14.26.01.png

Kevin Drescher February 24, 2023

I mean it creates the Issue and then claims it does not exist?

Kevin Drescher February 24, 2023

I solved the error by using this way:

https://community.atlassian.com/t5/Jira-Software-questions/Use-JIRA-automation-to-create-epic-with-issues/qaq-p/1898310

 

Most recently created Issue

and 

{{issue.get(0).key}}

Like Diogo Teles likes this
Kevin Drescher February 24, 2023

Sorry - scratch the last part.

 

{{createdissues.get(1).key}} is the correct way. Tasks didnt get linked to the epic.

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