Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

copy custom field value from epic to its children with automation rule?

BasKuijl
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 1, 2017

Hello,

I'm using the Codebarrel automation plugin for Jira and i can't seem to figure out how to get the rule working the way i want.

Could someone please help me how to shape this rule so it will work? 

I'd like a custom field value copied from parent epic to all sub-tasks/stories.

also when the field is changed the change must be reflected in all of its children.

1 answer

0 votes
Huw Evans
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 3, 2017

Hey there Bas,

This is very possible—I'll show you my setup:

Screen Shot 2017-12-04 at 3.03.38 pm.png

Our rule watches for any value changes in "My Text Customfield" (which you can change to whatever the name of your field is), then using a branch only edits the fields for associated Stories/other issues in the Epic.Screen Shot 2017-12-04 at 3.03.48 pm.pngFor the field value watcher we only need to watch for this field changing, since the branch will handle the selection of the child issues. Keep an eye on the note at the bottom though—if you have multiple translations of field names you'll need to include all of those translations at the top.Screen Shot 2017-12-04 at 3.04.02 pm.png

In your branch rule, make sure you uncheck the checkbox. If you leave it checked your rule won't update all of the children like you want. Also keep in mind that this might create performance problems for your instance as the warning box notes.Screen Shot 2017-12-04 at 3.04.10 pm.png

To access fields of the Epic, you need to use the Smart Field `triggerIssue`, which references the triggering Epic. If you use `issue` instead, you'll be able to access values from the child Story. To get access to your custom field, you can just write `{{triggerIssue.My Text Customfield}}` (including the spaces), replacing the name with the name of your custom field. If you want to access other fields, we have some good documentation on Smart Fields.

One more note: To make sure this runs correctly, the rule needs to be run globally, or from the same project as your Epic.

Let me know if you need anything else!

Huw

BasKuijl
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 7, 2017

Hi Huw,

Thanks for you answer and it looks pretty straight forward.

However the custom field i want to update isn't in the list in the "Edit issue" step. I can choose it in the "Field value changed" step. It's a url field so might that be an unsupported field?

Is there a way i can use this field?? 

 

Thanks For the help! 

Bas

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events