Automation - Json - Copy cascad field from one issue to another

Olivier B. April 27, 2024

Hi all,

I have absolutely no knowledge of JSON. I found how to copy a cascade field from one issue to another here : https://confluence.atlassian.com/automationkb/automation-how-to-copy-cascade-field-value-from-one-issue-to-another-issue-1267073177.html

It's work fine, but I would like to do it for several at once and I don't know how to put the two codes together.

 

How do I do for 2 cascad fields ?

Thanks for your help !!

 

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

 

3 answers

1 accepted

1 vote
Answer accepted
Benn TamanKuliner
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!
April 27, 2024

{
"update": {
"FIELD1": [
{
"set": {
"value": "{{triggerIssue.fields.customfield_10104.value}}",
"child": {
"value": "{{triggerIssue.fields.customfield_10104.child.value}}"
}
}
}
],
"FIELD2": [
{
"set": {
"value": "{{triggerIssue.fields.customfield_10105.value}}",
"child": {
"value": "{{triggerIssue.fields.customfield_10105.child.value}}"
}
}
}
]
}
}

0 votes
Olivier B. April 27, 2024

My kingdom for a coma ! Thanks everyone, 

0 votes
Dexter de Vera
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 27, 2024

Hi @Olivier B_ ,

Welcome to the Atlassian Community,

Try to add a comma then same process.

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

 

Benn TamanKuliner
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!
April 27, 2024
 

 

Suggest an answer

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

Atlassian Community Events