Forums

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

Automation Clone Issue from Project A to B (with Cascading Custom Field)

AndreH
Contributor
June 23, 2025

I am trying to use Automation to clone a ticket on a Schedule and JQL query.

Project - HD (this is the source project and the Issue type does not have the Cascading Custom Field)

Project - FAC (this is the destination project and has the Cascading Field, it is also Required to create)

I have tried several versions of the More Options (Additional Fields) as the Cascading Field is not a selection.

Here is the Code that I am using:

{
"update": {
"customfield_14705": [
{
"set": {
"BLD 11": "{{triggerIssue.fields.customfield_14705.value}}",
"child": {
"1ST FLOOR": "{{triggerIssue.fields.customfield_14705.child.value}}"
}
}
}
]
}
}

When I run the Automation, it fails stating that it needs the Custom Field.

JIRA Data Center version 10.3.7

AutoRule1.jpg

AutoRule2.jpg

2 answers

2 accepted

0 votes
Answer accepted
AndreH
Contributor
June 24, 2025

Correct code for Cascading Fields

{
"fields": {
"customfield_14705" : { "value": "BLD 11", "child": { "value" : "1ST FLOOR"} }
}
}

0 votes
Answer accepted
Trudy Claspill
Community Champion
June 23, 2025

Hello @AndreH 

You said the source project does not have the custom field.

But in the JSON code you are trying to set the custom field in the destination project by referencing values in the source issue for that same field, which you have said doesn't exist in the source project.

Screenshot 2025-06-23 at 12.49.22 PM.png

When you use triggerIssue you are telling the automation rule to get a value from the rule that triggered the issue. If customfield_14705 has no value in the trigger issue, then the above code is supply no value to use in setting the field in the destination issue. Therefore the field is blank and the validation to ensure it has been filled in fails.

If the source project does not use that field, but the destination project does and requires it to be filled, then what value to you want to use to set the field in the destination project? 

AndreH
Contributor
June 23, 2025

Yes, I am only trying to set the values in the Project B (destination project).

I've changed it to -

{
"set": {
"customfield_11447" : { "BLD 11": "parent_option1", "child": { "1ST FLOOR" : "p1_child1"} }
}
}
}
]
}
}

Tried Add and Ser, still gives the error that the field is required.

Trudy Claspill
Community Champion
June 23, 2025

In the code you showed above you changed the customfield ID, so you are no longer trying to set customfield_14705. That is likely the reason you are still getting the same error.

Additionally your syntax is incorrect. Referring to the example in the documentation:

https://confluence.atlassian.com/automation/advanced-field-editing-using-json-993924663.html

Cascading select custom field

Select a single parent value then a related child value. You can address them by 'value' or by 'id'.

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

or

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

You need to literally use "value" or "id" as the first part within the curly braces, and follow that with the actual value of the option you want to assign. When you use "value" you are telling the system the next thing supplied is the value you want to assign to the field. When you use "id" you are telling the system that the next thing supplied is the numeric ID for the value you want to assign to the field

If "BLD 11" is the value at the parent level and "1ST FLOOR" is the value at the child level, then the syntax you would need is

{
"update": {
"customfield_14705: {
"value": "BLD 11",
"child": {
"value": "1ST FLOOR"
}
}
}
}

 

Like Bill Sheboy likes this
AndreH
Contributor
June 23, 2025

Sorry, I was copying and pasting from the Atlassian doc.

I tried 

{
"update": {
"customfield_14705": {
"value": "BLD 11",
"child": {
"value": "1ST FLOOR"
}
}
}
}

 

And it's giving me - Error while parsing additional fields. Not valid JSON

Trudy Claspill
Community Champion
June 23, 2025

Can you provide a screen image showing the code you pasted into the action?

AndreH
Contributor
June 24, 2025

Here's the screen shots

 

 

001 New Settings.jpg

002 New Settings.jpg

AndreH
Contributor
June 24, 2025

I figured out the issue, the trailing brackets were the cause ] and }}}

This code works

{
"fields": {
"customfield_14705" : { "value": "BLD 11", "child": { "value" : "1ST FLOOR"} }
}
}

Trudy Claspill
Community Champion
June 24, 2025

You are missing the closing double-quotes at the end of he custom field name.

Screenshot 2025-06-24 at 8.38.40 AM.png

Trudy Claspill
Community Champion
June 24, 2025

I figured out the issue, the trailing brackets were the cause ] and }}}

In the image you provided there were no "]" (square brackets). The only error was the missing quotes.

Suggest an answer

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

Atlassian Community Events