Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Data Center Copy a Cascading (parent and child values) from Epic to Story

Brian Taylor October 2, 2023

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.pngScreenshot 2023-10-02 at 5.21.49 PM.png

1 answer

1 vote
Juan Mateo Gonzalez October 2, 2023

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
If you want, let me know and if not, we see that it may be failing.

I await your response

Regards

Brian Taylor October 3, 2023

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

Brian Taylor October 3, 2023

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.pngScreenshot 2023-10-03 at 10.12.30 AM.png

Juan Mateo Gonzalez October 3, 2023

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
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

Brian Taylor October 5, 2023

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

Brian Taylor October 5, 2023

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.pngScreenshot 2023-10-05 at 8.47.12 AM.png

Juan Mateo Gonzalez October 6, 2023


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!

Brian Taylor October 6, 2023

Juan - Well, different error 

 

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}}"
}
}
}
]
}
}

Juan Mateo Gonzalez October 6, 2023

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!

Juan Mateo Gonzalez October 8, 2023

Hi Brian, Has it worked based on my last comment?


Let me know if it works

Regards

Brian Taylor October 8, 2023

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

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}}}}"
}
}
}
]
}
}

Juan Mateo Gonzalez October 8, 2023

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.

Brian Taylor October 8, 2023

Juan - 

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

Screenshot 2023-10-08 at 3.55.41 PM.png

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events