Automation: Create child issue (task) on Epic when specific field is entered > More context below

Breanna Williams April 20, 2023

- When custom field in epic is selected as "yes", I would like for it to auto-create a child issue titled "xyz". I am seeing that this is is possible for sub tasks but I need this to be a task level due to the hierarchy in the future advanced road map

- There will be multiple child issue / custom field connections but I believe the same if/then/action can be duplicated once I get the shell down.

- Please see attached image with how far I have gotten

Screen Shot 2023-04-20 at 2.37.29 PM.png

2 answers

3 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.
April 20, 2023

Hello @Breanna Williams 

Is this for issues in a Company Managed project or a Team Managed project?

With the way you have the rule set up it is triggered when a new issue is created, and then the For Epic branch is looking for the parent Epic of the issue just created. 

I don't think that is the scenario you described.

It sounds like maybe it is the Epic itself that is being created and should be triggering the rule. Is that correct?

If so, then in that case you would want to remove that For Epic branch and instead

1. Have a condition to check if the newly created issue is an Epic

2. Have a Condition > If/Else Block to check if the custom field is set to the value that indicates a child issue should be created, and create the issue under that If block

3. Follow with Else-if blocks for checking the other fields and creating other issues, if the checks are mutually exclusive.

Screen Shot 2023-04-20 at 11.53.55 AM.png

 

For a Company Managed project as part of creating the Task you would set the Epic Link field to {{triggerIssue.key}} to link the new issue as a child issue of the Epic where the field was changed.

Breanna Williams April 20, 2023

Hi Trudy,

 

Apologies, I am new to Jira and should've mentioned this is for a Company-managed project.

 

Thank you for helping me with this breakdown -- you are correct. I would want the creation of the Epic to trigger this rule.

 

Rule should be:

- If "Yes, need to order" in custom field "Is product needed?" is selected, THEN a child issue should be created titled "Order Product For"

I am a bit confused on where the action is with creating the actual child issue? Could you explain more?

 

For additional context, the other custom fields I plan to use do not block one another. It is mainly to create a "to do list" based on the criteria added in the Epic. Let me know if that makes sense? @Trudy Claspill 

 

Appreciate your help thus far!

Breanna Williams April 20, 2023

Screen Shot 2023-04-20 at 6.12.05 PM.png

Breanna Williams April 20, 2023

A new screenshot ^ @Trudy Claspill I'm not sure I did this last step correctly.

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.
April 20, 2023

First we need to clarify what logic is needed.

Let’s say your Epics have Field1, Field2, and Field3.

Is the logic…?

If Field1= X create an issue AND

If Field2 = Y create another issue AND

If Field3=Z create a third issue

 

Or is the logic…?

If Field1=X create an issue and then I’m done.

If Field1 <> X then check Field2. If Field2 =Y then create an issue and I’m done.

If Field1 <> X and Field2 <> Y then check Field3. If Field3 = Z then create an issue and I’m done.

Breanna Williams April 20, 2023

Hi Trudy,

 

The logic is:

If Field1= X create an issue AND

If Field2 = Y create another issue AND

If Field3=Z create a third issue

 

Also, to update -- the "task" is being created once I create the epic with that rule. But they are not linking. What am I doing incorrectly?

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.
April 20, 2023

Before we get to the "why isn't it linking" we need to finish the discussion on the logic.

The problem with this logic:

If Field1= X create an issue AND

If Field2 = Y create another issue AND

If Field3=Z create a third issue

...is that the first condition that is not met will cause the rule execution to terminate without checking any of the remaining conditions. If Field2 doesn't equal Y, the rule will stop and Field3 will never be checked.

How many of these fields do you need to check?

Are any of the fields Selection List (select single item) where you will need to create different issues depending on the option selected in the list?

Are any of the fields Selection Lists (select multiple items) where you have to create different issues for each of the multiple items that might be selected?

Depending on the answers to those, you may need to create multiple rules to handle the checking of each field, or a small combinations of fields, separately.

---

As to why the created issue is not linking to the Epic, please show me the details of the Audit Log for the execution of the rule where it failed to link the created issue to the Epic.

0 votes
Elif Alverson June 16, 2023

@Trudy Claspill , I am working on a very similar automation. I would like to create child tasks based on the couple of fields. It does not create any tasks at all. It is a company managed project. Any suggestions? Thank you.

Screenshot 2023-06-16 at 6.08.46 PM.png

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.
June 16, 2023

Hello @Elif Alverson 

If your situation is "similar" but not identical, please start a new Question and provide the details of your scenario. That way, if we provide a working solution for your scenario the post can be marked as Answer Accepted and be found by other users with similar questions.

Include the information from the Audit Log showing the details of the rule execution.

Elif Alverson June 16, 2023

@Trudy Claspill , thank you for your response. I will start a new discussion.

 

Like Tracy Parish likes this

Suggest an answer

Log in or Sign up to answer