Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Copy field value from Epic to child issue with automation

Edited

There are couple fields in child issues that mostly match the parent issue, but sometimes need to be changed. For easy implementing I would like to copy the Epic values upon creating the child issue. I tried using 'Automation' in different configurations but I can't get it to work. It say's 'Succes' but the fields in the new issue don't reflect the fields in the Epic.

Schermafbeelding 2020-07-02 om 11.40.55.png

 

This is the current exported rule:

 

Schermafbeelding 2020-07-06 om 18.18.16.png

Thank you for taking your time to help me with this issue!

3 answers

1 accepted

4 votes
Answer accepted

Hi @Huey van Zijl 

Would you please post images of your rule definition?  That will help the community try to answer your question. 

Your custom fields are different from those defined in other people's instances, so importing the rule's JSON may not help others understand your rule.

Best regards,

Bill

Hi Bill,

Thank you so much for replying so soon! I've updated the original post. :)

- Huey

Hi Huey,

Thanks for the additional information.  Three next steps to try:

  • After the trigger, add a condition to test if there is an epic link.  This could be a timing issue, or perhaps the issue doesn't have an epic.
  • Your image shows the rule in draft status.  Is that just from viewing it, or are there un-published changes to save/publish?
  • Next, before your copy action, add a branch on the epic to add a comment including the parent's values of those fields.  That will confirm they are indeed what you expect prior to the copy.

Best regards,

Bill

Hi @Huey van Zijl 

An update: another community member saw a similar issue with the edit/copy not working.  They solved that by adding a re-fetch action to solve a potential timing problem where the created issue does not yet have the parent link.

So, your updated rule would be:

  • Trigger: issue created
  • Action: re-fetch the issue
  • Condition: confirm the issue has an epic link (not empty)
  • Action: edit issue to copy the parent epic's fields
Like # people like this

Hi @Bill Sheboy ,

 

Thank you so much for helping me, your advice did the trick! For anyone searching the forums here is my implemented solution:

 

20200707 Jira automation copy epic values to new child issue.PNG

Tip: be sure to configure the last step 'Then: Edit issue fields" correctly by telling it to copy from epic. :) 

Like # people like this
0 votes
Brellison I'm New Here Dec 15, 2021

I have this automation running and it works when an issue is created; however is there a way to get this to trigger when the field value changes on the Epic and it copies the the new field value to all child issues (tasks/stories)?Screen Shot 2021-12-15 at 12.05.16 PM.png

Hi @Brellison -- Welcome to the Atlassian Community!

First thing: please consider creating a new question, and perhaps linking to related ones.  That will ensure more people see it...only the people currently following this thread will see it otherwise.

On to your questions...

The rule you show is triggered on a field value change, not issue create.  Are you certain that triggers on create as you noted?

Next, you should be able to detect the change in the epic and then copy that down to its child issues.  For example:

  • trigger: field changes
  • condition: issue type is epic
  • branch: on the epic's child issues
    • action: edit the field, copying from the trigger issue

Please also see the template library for other example rules like this: https://www.atlassian.com/software/jira/automation-template-library#/

Kind regards,
Bill

Like Roopa Dass likes this
Brellison I'm New Here Dec 15, 2021

Thanks for your help Bill! Your solution helped.

 

For clarification, I had the original rule in this thread running fine, but found a limitation in it that when the Epic's fields were updated, the existing issues' fields did not update to reflect the new value. But the automation you provided me fixes that.

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
Community showcase
Published in Jira

Do you use Jira Cloud with Microsoft Teams?

Hi, Jira users! Do you use Jira alongside Microsoft Teams? We want to hear how you’ve used the power of Jira Cloud and Microsoft Teams (via the Jira Cloud for Microsoft Teams app) to achieve a team...

256 views 1 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you