Forums

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

Update Multi-select field from string list?

Ari Raatikainen
Contributor
April 30, 2025

Assume there is a comma separated text string textstring = "option1, option2, option3"

All the values in textstring are always possible select options of multi-select custom field selectfield

How can I update values from textstring to selectfield using Jira Cloud automation?

textstring can contain from 0 values to 3 values max.

 

1 answer

1 accepted

1 vote
Answer accepted
Dick
Community Champion
April 30, 2025

Hi @Ari Raatikainen 

A small search goes a long way: Atlassian on Update Multiple Choice Fields

Kind regards,
Dick

Ari Raatikainen
Contributor
April 30, 2025

Thanx, Scenario 4 looks same as mine, so will try the solution proposed.

Like Dick likes this
Dick
Community Champion
April 30, 2025

If you encounter any difficulties, put them here so that we can solve them.

Kind regards,
Dick

Ari Raatikainen
Contributor
May 1, 2025

@Dick I really appreciate you are available to help. I post again if a hand is needed.

Ari Raatikainen
Contributor
May 2, 2025

@Dick I would need help

The JSON of Scenario 4 in Update Multiple Choice Fields Using Automation in Jira | Automation | Atlassian Support is reported invalid

{ "update": { "Select List Multiple Choices": [ {{#issue.Select List Multiple Choices 2}}{"add": {"value":"{{value}}"}}{{^last}},{{/}}{{/}} ] } }

Invalid JSON!

Error: Parse error on line 1:
...ltiple Choices": [ {{#issue.Select List 
-----------------------^
Expecting 'STRING', '}', got '{'


In my case using below static update works nicely
{
"update": {
"Used by": [
{"add": {"value":"Option A"}},
{"add": {"value":"Optino B"}}
]
}
}

 

Like Dick likes this
Dick
Community Champion
May 2, 2025

Thanks for reporting that in @Ari Raatikainen , and providing the correct answer.
I've reported the error and linked it to this community question. 

Kind regards,
Dick

Ari Raatikainen
Contributor
May 2, 2025

Thanks. Although the static update works, I am still in need of solution for Scenario 4.

Dick
Community Champion
May 2, 2025

The basic construct (from Atlassian on field editing )

 

{
    "update": {
        "description": [{
            "set": "a new description"
        }],
        "labels": [{
                "add": "test-label"
        }]
    },
    "fields": {
        "summary": "woohoo! a new summary"
    }
}

 

The elements in the array should have curly braces (in bold) and a string "value": is put in too much:

{ "update": {
"Select List Multiple Choices":[ 

  {{#issue.Select List Multiple Choices 2}}

{

"add": "value":"{{.value}}"

}

{{^last}},{{/}}{{/}}

]

}

}

Dick
Community Champion
May 2, 2025

And that same page also shows that it's not supporting custom fields. 

sigh... I knew that, but forgot it. 

Kind regards,
Dick

Like Ari Raatikainen likes this

Suggest an answer

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

Atlassian Community Events