I have a JIRA project with issues which have a custom field "customfield_10101". This field shows up in JIRA UI as 'Platform'.
The field has values 'None', 'iOS', 'Android' etc. 'None' is default value. It looks like this when I want to create an issue in UI:
I want to create an issue using JIRA API trying to fill this field like this:
{"customfield_10101": {"value": "None"}}
It doesn't work. I've got an error "'{"errorMessages":[],"errors":{"customfield_10101":"Could not find valid \'id\' or \'value\' in the Parent Option object."}}'".
None, "null", null, -1, "" doesn't work either.
I've tried not to pass this field at all and got an error "Platform filed is required.".
How I can pass this None default value?
Welcome to the Atlassian Community!
>The field has values 'None', 'iOS', 'Android' etc.
Actually, no it does not have a value "none" - that's what Jira displays to represent the option for "don't set anything in this select list field". IT's displaying text for the humans, as a blank line is easy to miss.
It's not the default value for the field either, it's the current value (not set).
The API won't let you create the issue with the field set to "none" (meaning empty), you have the field flagged as mandatory in the settings.
You could reconfigure the field to either have an option for "other", or you could set a default value for it. (If you leave it mandatory and set a default, Jira won't offer the users "none" when they create or edit the field)
Hi @Evgeniya Shchepina -- Welcome to the Atlassian Community.
Yes, and to Nic's answer: when you need to clear a field (and it is not required) with that syntax, please try setting it to null with none of the fields/attributes referenced:
"customfield_10101": null
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.