Forums

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

Advanced branching setting custom field

Molly Hopper
Contributor
March 24, 2026

I am working on creating work items in an epic using automation. The epic has a custom field "Matrix" that is a multi-select. For each selection we make a new work item using a branch. That is working fine. I've set the variable name as Matrix. 

image.png

I need to set the matrix custom field in the newly created work item to be the single matrix value used to create the work item from the "For Each:", rather than all that are listed in the epic's field. I think I need to use the the additional fields box, but I'm unsure of the appropriate JSON syntax. I get an error message when using the below option.   

image.png

1 answer

3 votes
Trudy Claspill
Community Champion
March 24, 2026

Hello @Molly Hopper 

First, when creating a variable it is best to use a name for the variable that does not match any field name to avoid confusion about whether you are the reference is trying to get data from the field or from the variable. I like to preface my variables with "var"; i.e. varMatrix.

Second, there is a reference document that shows how to use JSON to set a variety of field types. For a Select List field the format is:

https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/#Single-select-custom-field

{
"fields": {
"customfield_11449" : { "value": "option3" }
}
}

 So for your case it would be (with the variable name change I recommended):

{
"fields": {
"Matrix" : { "value": "{{varMatrix}}" }
}
}

Give that a try and let us know if it works.

Molly Hopper
Contributor
March 24, 2026

Updated as specified, and I'm getting errors when running the rule. image.pngimage.png

Molly Hopper
Contributor
March 24, 2026

image.png

With the additional brackets, this version worked. 

Like Trudy Claspill likes this
Trudy Claspill
Community Champion
March 24, 2026

Ah, yes, my error.

I misread that the "Matrix" field you were trying to set in the new issue was a single select field, but it is actually multi-select. So, yes, you do need the square brackets when setting value(s) in a multi-select field, even if setting just one value.

https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/#Multi-select-custom-field

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
March 24, 2026

Hi @Molly Hopper and @Trudy Claspill 

For option fields, the default attribute is the id attribute of the selected option(s).  That is, in the Advanced Branch source you show, I would expect that to return the id and not the value attribute...and thus fail in the JSON expression.

If your Work Item Create is still failing for that reason, perhaps change the source for your Advanced Branch to this:

{{issue.customfield_10074.value}}

 

Kind regards,
Bill

Like Trudy Claspill likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events