I’m trying to create issues via the API, but I’m having an issue with one of the required custom fields. The custom field (called Due Date Priority, 10126) is a drop down type field.
In the JSON body, I’ve tried supplying the ID, the value of the option, both, etc (example below). But I keep getting the error message:
“customfield_10126”: “Due Date Priority is required.”
I’ve tried the below, trying the value of the option, as well as both together.
"customfield_10126": {
"id": "{ID of option}"
}
What syntax is this endpoint looking for to specify a drop down type custom field?
Thank you for the help!
Welcome to the Atlassian developer community @ajfitzsimmons.
Have you tried the ID as an integer without quotes?
Every time I need to figure out how to properly structure the JSON for fields, I end up consulting Advanced Field Editing JSON. To this day, I don’t know why it’s a support document, not in the Jira API docs.
Thank you @ibuchanan!
I tried without quotes previously, but looking again, I realized it was on the wrong side of the closing bracket of the fields property… duh. At least I got a new error!
So it turns out that the ID needs to be in quotations, I got an error when treating it as an integer.
Sorry for the trouble, I can’t believe I didn’t double check, too many }'s in a row I guess. Thank you for your help! And I’ve bookmarked that document, thanks again!
1 Like