Forums

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

Add value to a Select List CustomeField using Automation

Jacob Pines
Contributor
December 26, 2023

Hi,

I am looking for a way to add a value from 1 field (short text) as a new option value on a CustomField (select list).

I tried this on Edit Issue Field > More Options:

{
"update": {
  "customfield_10407": [{
    "add": {
      "key":"{{issuetrigger.customfield_10267}}"}
}]}}

Automation fails with error:
"(Field with id' customfield_10407' and name 'TestSelectListValue' does not support operation 'add' Supported operation(s) are: 'set')"

Would appreciate some help to understand how I can add value to the list, or at least how I can change options on the field to allow adding value.

Let me know if any information is needed.

Thanks

1 answer

0 votes
Fernando Eugênio da Silva
Community Champion
December 26, 2023

@Jacob Pines 

 

If you're trying to add a new option for this selected field you need to add this new option using REST API through automation interface. Here is the doc details: https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-fields/#api-rest-api-3-field-fieldid-put

 

But if the option already exists for this field and you want only to fill the field, maybe you just need to change your add to set in your payload. Basically, set is used for fields who support only one value and add for fields who support multiple values.

Hope this helps.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events