Forums

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

How to set a custom field with type Select List (single choice) with JSON values

Jayson Kurtyka February 2, 2024

Greetings all,

I'm receiving a 400 error when attempting to pass a specific JSON value from Google Sheet to create Jira ticket.

I have a string value (due to using stringify method to prep JSON data prior to transmission) and want to use that value to set the value of a custom field that has a type of Select List (single choice).

Is there a way to pass JSON values to a custom field type of Select List (single choice)?

To confirm, the value that is in the JSON data matches the exact single choice entry in the Select List, i.e. JSON value (after stringify) = "radar.nd.x420" and the value that is in the Select List = radar.nd.x420.

Also to confirm that the other JSON values to other custom fields are passed just fine with no issues, the 400 error only occurs when the JSON code is added to try and pass value to Single List custom field.  I have also confirmed that the correct custom_field ID is being used.

Here is exact error message

Screenshot 2024-02-02 at 10.24.35.png

I'm continuing to search for answers but am having difficulty finding answers.  Thanks!

 

1 answer

1 accepted

0 votes
Answer accepted
Jayson Kurtyka February 2, 2024

Found a great example/explanation here

Long of short:  I had the JSON written incorrectly so it was causing error, I updated JSON line for the Single List field value to the following

 

"customfield_xxxxx": {"value":xxxxxx},

Thanks to ibuchanan

Suggest an answer

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

Atlassian Community Events