Automation - create story subtasks for specific epic with due date

Tina Leszkiewicz
Contributor
December 21, 2022

Hi there.

One of my supervisors requested that I play around and see if I can build one automation that contains both of the following components:

  • Auto-create subtasks for stories only when the epic = Testing
  • When/if there is a due date for the story, have the due date for the subtasks be 3 days before the story's due date 

I am able to get the automation to create the subtasks for a story, but I can't seem to get it to only create for the specific epic (which has to be assigned after I create the issue).

I'm also having an issue determining the correct format for the due date field. Basically just having issues all around and as a newbie to Jira not quite sure how to build this automation from scratch.

 

Thanks for any advice 

1 answer

1 accepted

0 votes
Answer accepted
Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 21, 2022

Hi @Tina Leszkiewicz ,

when you say epic = testing, what field are you speaking about, Epic name, custom field other? can you share a screenshot of your current rule? Let me take a stab at creating a rule to share to get you close anyway.

Tina Leszkiewicz
Contributor
December 21, 2022

@Jack Brickey 

Hi Jack.

I actually was able to figure out how to get the subtask due dates to work! Coding is not even close to my field, but I found a solution online in a different community forum. So the only Issue I'm having is with the epic. 

I'm looking for the automation to run only when the epic name is "Testing Epic". The automation seems to run fine with all other aspects, but doesn't seem to work when I add the epic name component.

Here's my current build, including what I have for the epic name, which I though was pretty self-explanatory.

Thanks!

 

Screen Shot 2022-12-21 at 9.56.13 AM.png

Tina Leszkiewicz
Contributor
December 21, 2022

Or perhaps the thing I'm looking for is actually the epic link? Honestly, I'm not too sure what the difference is. 

Like Jack Brickey likes this
Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 21, 2022

Hi @Tina Leszkiewicz ,

Good to hear that you have the date part working. The issue with your epic is that you're using epic name which is only associated with the epic type. What you need is the epic link for the story. The epic link is what points back to the epic parent. What you want to use in pale of your Issue fields condition is a JQL condition  - "epic link" = "Testing Epic"

Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 21, 2022

Also note that in the near future Atlassian is changing the way Epics are presented. I think that "parent" is going to replace epic link. This is how it is named in team managed projects today. This will allow "Parent" to be used regardless of whether it is a story or a subtask. If that makes sense.

Tina Leszkiewicz
Contributor
December 21, 2022

hi @Jack Brickey 

Thanks, that explanation is super helpful. I'm new to Jira as of 4 months ago, so coming in the middle of them making changes has been...interesting. haha

I updated the condition to a JQL but when I went to validate the query, I get the following error message. I do have other tickets on my board that are linked to this epic so I'm not sure what the issue is

Screen Shot 2022-12-21 at 10.15.47 AM.png

Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 21, 2022

Does the epic in fact exist and is the name precisely "Testing Epic"? Are you by chance using a team manage project here? if TMP replace "epic link" with "parent"

Tina Leszkiewicz
Contributor
December 21, 2022

My board is a TMP so changing the JQL to "parent link" = "Testing Epic" worked for the query Validation! :) 

 

However, when I do a test run, the automation is not running. Here are the steps I am going through:

  • Click the 'Create' button
  • Change issue type to story 
  • Add a summary/name
  • Add due date
  • Create

Then I click into the ticket and assign it to the epic "Testing Epic", since this option is not available in the create ticket window.

 

When I go back to my board, the subtasks do not populate. The automation runs perfectly before I add the JQL condition, but it seems like once I add the parent link component to the If:all match section, something breaks. 

Tina Leszkiewicz
Contributor
December 21, 2022

And yes, the epic name is specifically written as "Testing Epic"

Tina Leszkiewicz
Contributor
December 21, 2022

Update: I found out that team-managed projects do not allow epic links (for whatever reason), so this automation will be impossible for me to run as I want it to.

However, this automation will eventually be run on a Company managed board so I'll just keep my fingers crossed and hope that it initiates correctly without messing up any of our tickets. 

Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 22, 2022

Hi @Tina Leszkiewicz , Yes, epic link is not a field associated with TMP. As stated previously, epic link is replaced by parent. So you're JQL should look like below and should allow you to proceed with your rule with your TMP project.

parent = abc-123 

where abc-123 is the issue key for your epic

Suggest an answer

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

Atlassian Community Events