Data Center Copy a Cascading (parent and child values) from Epic to Story
Asked by Brian Taylor:

I am trying to copy the values from an Epic for a Cascading field to the associated stories.

If an issue is created or updated and the epic link is set to copy the field from the Epic, that has cascading values of parent/child values.

I do not get an error in the audit log but nothing is getting set.

I have tried different methods with no luck.

Note: This is on Data Center Jira software.

![Screenshot 2023-10-02 at 5.22.18?PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/284089i8D0FA7C40F8F14A3/image-size/large?v=v2&px=999 "Screenshot 2023-10-02 at 5.22.18?PM.png")![Screenshot 2023-10-02 at 5.21.49?PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/284090i738A432C7456726B/image-size/large?v=v2&px=999 "Screenshot 2023-10-02 at 5.21.49?PM.png")


Answers:
author: Juan Mateo Gonzalez
body: Hi Brian, I'm noticing that in the screenshots sent the automations are listed as "disabled", is it possible that they are not enabled and that is why there is nothing in the audit log?

![Captura de pantalla 2023-10-02 192138.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/284096iA25E4E206F1D2764/image-size/large?v=v2&px=999 "Captura de pantalla 2023-10-02 192138.jpg")  
If you want, let me know and if not, we see that it may be failing.

I await your response

Regards

comments: author: Brian Taylor
body: Juan - I disabled them because they are not working and wanted to reach out to the community as to why they may not be working


author: Brian Taylor
body: This is the latest update to the automation. It states in the log that it is successful, but values are not updated.

![Screenshot 2023-10-03 at 10.10.58 AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/284230iD6C41D3AD23DE922/image-size/large?v=v2&px=999 "Screenshot 2023-10-03 at 10.10.58 AM.png")![Screenshot 2023-10-03 at 10.12.30 AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/284229iADD9FB093F4F2CCC/image-size/large?v=v2&px=999 "Screenshot 2023-10-03 at 10.12.30 AM.png")


author: Juan Mateo Gonzalez
body: Brian, okay, perfect. So it is not a disabling problem. But notice that in the last screenshots sent, the issue that triggers the event is "PSPCA-9085" and in the if block it is compared to PSPCA-9085 and then in the component that also edits PSPCA-9085.

![Captura de pantalla 2023-10-03 153139.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/284263iB4269790A7B77105/image-size/large?v=v2&px=999 "Captura de pantalla 2023-10-03 153139.jpg")  
You work on the same type of incident that triggered the event, not on the linked stories.  
You would be missing this last capture of the rule whose name is "Epic Test in Creation"  
The "for" component to indicate that it is towards the stories and not in the epic  
Please let me know if I am clear in my answer.

Greetings


author: Brian Taylor
body: Juan - Thank you. I think I tried that method as well. So I changed as you recommended, and I still get the same results.

![Screenshot 2023-10-05 at 8.19.40 AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/284654i97FE9DFA78AFE701/image-size/large?v=v2&px=999 "Screenshot 2023-10-05 at 8.19.40 AM.png")


author: Brian Taylor
body: Juan - I tried a different method using a JQL if an epic link equals a specific Epic and then set the values. It ran successfully, but no values were set even though the logs state the edit was successful.

![Screenshot 2023-10-05 at 8.47.35 AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/284659i4CAD619DAF865BE2/image-size/large?v=v2&px=999 "Screenshot 2023-10-05 at 8.47.35 AM.png")![Screenshot 2023-10-05 at 8.47.12 AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/284660i3D0FE4DC15F1FF40/image-size/large?v=v2&px=999 "Screenshot 2023-10-05 at 8.47.12 AM.png")


author: Juan Mateo Gonzalez
body: Hi Brian, I think I can now see where the error is. I haven't seen it before, try this:

TRIGGER: CREATE ISSUE

CONDITION: ISSUE TYPE = STORY

ACTION:

{  
"update": {  
"Your cascade field": \[  
{  
"set": {  
"value": "{{issue.epic.fields.Your cascade field.value}}",  
"child": {  
"value": "{{issue.epic.fields.Your cascade field.child.value}}"  
}  
}  
}  
\]  
}  
}

The problem was that it called the issue trigger and must call the "epic" field in both the parent and child values: {{issue.epic.fields.Your cascade field.child.value}}

Let me know if it worked!


author: Brian Taylor
body: Juan - Well, different error

![Screenshot 2023-10-06 at 10.54.12?AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/284976i6B1B4FFDF953E290/image-size/large?v=v2&px=999 "Screenshot 2023-10-06 at 10.54.12?AM.png")

*** ** * ** ***

Code:

{  
"update": {  
"customfield_14206": \[  
{  
"set": {  
"value": "{{issue.epic.fields.customfield_14206.value}}",  
"child": {  
"value": "{{issue.epic.fields..customfield_14206.child.value}}"  
}  
}  
}  
\]  
}  
}


author: Juan Mateo Gonzalez
body: Hi brian, you have an error in this line:

"value": "{{issue.epic.fields..customfield_14206.child.value}}"

You put a colon ".." when it is just one "."

Try: {{issue.epic.fields.customfield_14206.child.value}}

Thanks, let me know if worked!


author: Juan Mateo Gonzalez
body: Hi Brian, Has it worked based on my last comment?

<br />

Let me know if it works

Regards


author: Brian Taylor
body: Juan - That was a good catch but no, it did not work. I was hoping.

![Screenshot 2023-10-08 at 2.57.23?PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/285103iE1CAB343B7E2723B/image-size/large?v=v2&px=999 "Screenshot 2023-10-08 at 2.57.23?PM.png")

![Screenshot 2023-10-08 at 2.58.51?PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/285105iBC26B5ACB18A4EB6/image-size/large?v=v2&px=999 "Screenshot 2023-10-08 at 2.58.51?PM.png")

Code:

{  
"update": {  
"customfield_14206": \[  
{  
"set": {  
"value": "{{issue.epic.fields.customfield_14206.value}}",  
"child": {  
"value": "{{{{issue.epic.fields.customfield_14206.child.value}}}}"  
}  
}  
}  
\]  
}  
}


author: Juan Mateo Gonzalez
body: Brian you have a new error again, in this line you put : ""child": {  
"value": "{{{{issue.epic.fields.customfield_14206.child.value}}}}""

You are putting "{" too much.

The correct code:

{  
"update": {  
"customfield_14206": \[  
{  
"set": {  
"value": "{{issue.epic.fields.customfield_14206.value}}",  
"child": {  
"value": "{{issue.epic.fields.customfield_14206.child.value}}"  
}  
}  
}  
\]  
}  
}

Don't change anything, it should work fine.


author: Brian Taylor
body: Juan -

No, I am getting the same error stating a FAILURE using your code.

![Screenshot 2023-10-08 at 3.55.41?PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/285108i4E94CC392095C8F7/image-size/large?v=v2&px=999 "Screenshot 2023-10-08 at 3.55.41?PM.png")