How to Copy Custom field values from parent to child with Jira Automation

Shaun April 16, 2024

Hey there folks!

Been banging my head against the screen for the best part of the day trying to solve this but I really need some help!

For a bit of context

I have a hierarchy as follows:

Theme -> Epic -> Story -> Sub-task

I want to create a series of automations/branches that do the following on a scheduled basis

  1. Sub-tasks inherit custom field values from Stories/parent
    1. 'Strike Team' (Mutl-select) | customfield_10177
    2. DoD (Single-select)
    3. 'Theme'  (Single-select)
  2. Stories inherit custom field values from Epic/Parent
    1. "Theme"
  3. Epic inherit custom field values from Theme/parent
    1. "Theme"



I've tried various options with no joy, mostly around having this flow:

  1. Schedule trigger with JQL for Project
  2. Branch Parent
  3. Edit Issue (With some JSON)


For (3.) here are the JSON I've tried, specifically for 'Strike Team' (Multi-select)...all to no avail:

{
"fields": {
"customfield_10177": [
{ "value": "{{issue.parent.customfield_10177}}" }
]
}
}


{
"fields": {
"customfield_10177": "{{issue.parent.customfield_10177}}"
}
}

{
"fields": {
"customfield_10177": "{{issue.parent.customfield_10177.asJsonObjectArray('value')}}"
}
}


{
"fields": {
"customfield_10177": "{{issue.parent.customfield_10177.id}}"
}
}




Any of you folks have any neat solutions? As the contents of these custom fields may change, I'd prefer to have the automations requiring very little maintenance. 

I'm not so familiar with JSON so anyone willing to have a go at solving my issue I'd be eternally grateful for! I can then hopefully apply the solution to other custom fields! :)

Many thanks and stay awesome,
Shaun





1 answer

1 accepted

1 vote
Answer accepted
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 17, 2024

Hello @Shaun 

Welcome to the Atlassian community.

Have you tried simply selecting the field and then selecting the Copy option and copying the value from the same field in the Parent issue?

Screenshot 2024-04-17 at 1.25.06 AM.pngScreenshot 2024-04-17 at 1.25.16 AM.pngScreenshot 2024-04-17 at 1.25.25 AM.pngScreenshot 2024-04-17 at 1.25.36 AM.png

Shaun April 17, 2024

Wow - such a clean solution - I hadn't noticed those 3 little dots had that option behind!

This might just be the miracle I've been looking for!

Thanks so much :)

Like Trudy Claspill likes this
Guillaume Beaulieu November 11, 2024

That solution looks like it could help me a lot, but I don't have the "Another Global Select List" option in my edit actions :( I wonder if it's only available for Premium users? 

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.
November 11, 2024

@Guillaume Beaulieu 

Welcome to the Atlassian community.

"Another Global Select List" is a custom field I added to my instance. I used it as an example to provide screen images for the COPY option.

You need to select the field that you want to update in your issues. Click on the Choose fields to set button to open the dialog for selecting from fields that are available in your instance.

Screenshot 2024-11-11 at 8.52.21 AM.png

Guillaume Beaulieu November 11, 2024

Wow I feel dumb :) 
Thanks for the help, I found another way to do it meanwhile but your solution is way more simple... 

Suggest an answer

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

Atlassian Community Events