Forums

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

Copy cascading customfield value from epic to child issues

Lean Li
Contributor
May 21, 2024

I have a cascading custom field on Epics and Tasks. What should be the JSON syntax in my Jira automation for copying the value from the parent Epic to it's Task.

At the moment the locig in the automation is this:

  • Trigger: issue created
  • Condition: confirm the issue has an epic link (not empty)
  • Action: edit issue to copy the parent epic's fields: components, customfield_15800 (advanced)

I have tried this JSON, but i doesn't work - automation copies component field but doesn't copy the value in customField_15800 to a task from it's parent epic (automation end is succes though):

{
"update": {
"customField_15800": [
{
"set": {
"value": "{{triggerIssue.fields.customField_15800.value}}",
"child": {
"value": "{{triggerIssue.fields.customField_15800.child.value}}"
}
}
}
]
}
}

 

Any idea on what the syntax should be would be greatly appreciated. Thank you alredy in advance!

1 answer

1 accepted

0 votes
Answer accepted
Vikrant Yadav
Community Champion
May 22, 2024

Hi @Lean Li  For updating a cascading field this is the format : 

Cascading select custom field

Select a single parent value, and a related child value. You can address them by value or id.

"customfield_11447" : { "value": "parent_option1", "child": { "value" : "p1_child1"} }

or

"customfield_11447" : { "id": 10112, "child": { "id" : 10115 } }

 

{
"fields": {
"customfield_10305" : { "value": "{{cascadingParentValue}}", "child": { "value" : "{{cascadingChildValue}}"} }
}
}

 

Screenshot 2024-05-22 141726.pngScreenshot 2024-05-22 141748.png

Lean Li
Contributor
May 22, 2024

Thanks this helped a lot! With this automation structure and these variable values I got it working:

  • cascadingParentValue
    {{Issue.fields.customField_15800.value}}
  • cascadingChildValue
    {{issue.fields.customField_15800.child.value}}
Like Vikrant Yadav likes this
Vikrant Yadav
Community Champion
May 23, 2024

Glad to hear I am able to help you! 

 

 

Suggest an answer

Log in or Sign up to answer