How to copy a custom field value from the Epic when a new story (Child-Issue)

Matt Johnson July 19, 2023

I'm trying to write an Automation workflow that copies a custom field from the Epic to the new Child Issue (Story) if the Epic has a value in the custom field. Here's the details of the workflow

JiraStrategicAutomation.JPGI

However, when I create a new issue (using the Add a Child Issue from the Epic and the Automation fires it doesn't take any action. 

Instead, it states that the 2nd condition (Epic exists) did not pass, when clearly I have an Epic as the Child Issue is being created from it. 

Am I missing something?

JiraStrategicAutomation2.JPG

Any assistance is greatly appreciated. 

2 answers

1 accepted

1 vote
Answer accepted
Matt Johnson July 21, 2023

After speaking with Atlassian Support I was able to determine that there is in fact an association between Epic and Story in both Company and Team Managed project types and  wanted to share this in case someone runs in to the same issue I had:

Cause: 

the automation is attempting to perform the steps in parallel, which resulted in not finding the parent of the issue being created. 

Solution: 

Add a Action step: "Re-Fetch issue data" before referencing the Epic or Parent. 

Refetch.JPG

What the 'Re-Fetch issue data" function does: 

The re-fetch action is designed to refresh and retrieve the most recent version of the data, ensuring that the automation has the latest information to work with. This helps prevent errors and inconsistencies that may occur due to simultaneous actions.

 

Thanks for the replies everyone! Atlassian definitely has a great support community! 

Walter Buggenhout
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 16, 2023

Thx for sharing, @Matt Johnson!

Like # people like this
Michael Ludvigson September 11, 2024

wow, I was looking for something like this today and there was your solution!  Thanks for posting the update from Atlassian Support too.  Looks like mine are still not populating the underlying stories, after the fact.  Am I missing something in my rules?rule.PNG

0 votes
Walter Buggenhout
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 19, 2023

Hi @Matt Johnson,

At first sight I cannot see anything particularly wrong with your automation. I built a similar rule to check what might be missing and did more or less the same. The only thing I am sure I did differently, was add a check on the created issue type, so I am sure that I am validating a story:

Screenshot 2023-07-19 at 20.15.29.png

Also, check the scope of your automation rule to make sure the linked epic is in a project that is included in that scope.

Hope this helps!

Matt Johnson July 19, 2023

Thanks for the reply, so when you did this it worked? 

I did verify that the Project Scope is specified already. I deleted the workflow and started from scratch again. This time it took no action claiming the Issue did not match the 2nd condition (and: Epic Exists) when the Epic I created it from sure does exist. 

JiraStrategicAutomation3.JPG

JiraStrategicAutomation5.JPG

 

 

Walter Buggenhout
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 19, 2023

Is your project team managed or company managed @Matt Johnson? In my setup it does indeed work, in a company managed project.

Matt Johnson July 19, 2023

It's a Team-Managed project. However, I'm writing this Automation in the Project, not under Global Administration. As I'm an Admin for our Atlassian Account I could try doing this at the Global automation level, but it seems odd that would be a factor in why it doesn't work. 

Walter Buggenhout
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 19, 2023

Yet it does. In company managed projects, the link between epics and stories used/uses the epic link field, something that doesn't exist in team-managed projects.  In team managed projects, these parent-child relationships are not recognised.

Matt Johnson July 19, 2023

I was able to perform a similar task using the Actions within an Epic to copy the value to the child issues without a problem, 

So if I understand you correctly, you're saying that for team-managed projects, there's no relationship between the Parent (Epic) and Child Issues? 

 

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