I am trying to create an issue (of type task) in an epic, using Jira Automation

sfullman September 8, 2020

There are quite a few examples showing how to do this by linking a task to an epic, but I want the task added to the epic.

Step 1:

A user creates an Epic. The epic has a custom field  titled Brand:

Step 2:

When the Epic is saved, with a Brand selection it triggers a rule.

Step 3:

The rule, based upon issue type = Epic, and Field Brand = [Some Value] Create one or many tasks.

This works like a champ, I can create in some instances up to 35 tasks if all the options are selected.

Step 4

What I can't get working is showing these tasks as part of the Epic in the backlog of my Kanban board.

(Slimmed down version of my rule)

*Note

I can get this to relate to the Epic fine.

However, that doesn't help to have a bunch of tasks related to an epic.

My first iteration was a custom issue with sub tasks. The sub tasks worked fine, so I guess they automatically relate to the parent issue.  My users decided they wanted to keep the Epic - Task relationship instead.

 

example1.pngexample3.png

1 answer

1 accepted

0 votes
Answer accepted
Kevin Bui
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 9, 2020

Hi @sfullman - If I'm understanding you correctly, what you want is to have a rule that triggers when an epic is created and that epic also has a value in the field Brand. This rule must create a task and add it to this epic. Is this correct?

If so, then you should be able to accomplish this with the following:

1. Trigger: Issue created, as per your rule.

2. Conditions: I would use two instances of the Issue fields condition; one to check that Issue type = Epic, and one to check that Brand is not empty. The JQL you've used is probably fine, but I find the Issue fields condition to be easier to use and manage.

3. Action: I would use the Create issue action as you have done in your rule, but ensure that you have Issue type = Task and Epic link = Trigger issue. See screenshot below.

Screen Shot 2020-09-09 at 11.02.03 pm.png

The rule would look like this (I used Labels, since I don't have a Brand field on my instance):

Screen Shot 2020-09-09 at 11.09.36 pm.png

I tested this rule setup on my Scrum board, and it seems to have worked. Hope this helps! Please let me know if it doesn't.

sfullman September 9, 2020

Thanks, quick question though. When I create the action to create a task, I do  not find the field [Epic Link] is available. When I search for the field I get two Epic Link entries that you see in the image below. When I run the rule they are not recognized

example4.pngexample5.png

sfullman September 9, 2020

I may have stumbled into a solution, but not sure I know why.  You can see two fields above labeled as Epic Link. I tried the first field and received an error. I went back and tried the second and it worked.  Not sure why, and it seems like those fields are custom according to the error.

Suggest an answer

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

Atlassian Community Events