Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to set custom field option value when creating a issue via JIRA API?

Peter Jerold Leslie October 12, 2023

I have tried setting a custom field option value when creating an issue via Jira API. The request was successful and the Jira issue was created successfully. However, the custom field value is not set. Please help me to fix this.

Here are my request details:

Request URL: https://redesigngroup.atlassian.net/rest/api/3/issue

Request Method: POST

Request Body: 

{
"fields": {
"project": {
"key": "TRUST"
},
"summary": "test issue 55",
"description": {
"content": [
{
"content": [
{
"text": "test description reporter 55",
"type": "text"
}
],
"type": "paragraph"
}
],
"type": "doc",
"version": 1
},
"issuetype": {
"name": "Support"
},
"reporter": {
"id": "557058:f58131cb-b67d-43c7-b30d-6b58d40bd077"
},
"assignee": {
"id": "6308d263663a6ba49bd7ce20"
},
"customfield_10226": {
"value": "Yes"
},
"customfield_10006": "TRUST-5545"
}
}

1 answer

0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 12, 2023

Hello @Peter Jerold Leslie 

Welcome to the Atlassian community.

Which of the custom fields in your code failed to get set? There appear to be two custom fields in your code.

What is the field type of the custom field?

Peter Jerold Leslie October 12, 2023

Hello @Trudy Claspill

The field that is not getting updated is `customfield_10226` which has the options "Yes" and "No"

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 13, 2023

What type of field is that?

Selection List

Checkboxes

Radio Buttons

???

Peter Jerold Leslie October 14, 2023

@Trudy Claspill It's a selection list in the JIRA console. But I am trying to set it via API.
Monosnap [TRUST-5591] Application Security Baseline Requirements - Jira 2023-10-14 13-24-36.png

Suggest an answer

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

Atlassian Community Events