I have a JIRA board which has a custom field: customfield_20582 which shows up as 'priority', say, in the UI.
It has values 'high', 'medium', 'low' and the default which is 'none'.
I have a request to create a new issue like this:
POST blah/rest/api/2/issue/
BODY:
{
"fields": {
"project":
{
"key": "ABCD"
},
"summary": "here is a summary",
"customfield_20582": {
"value": "None",
},
"description": "here is a description",
"assignee": {"name": "123456"},
"reporter": {"name": "654321"},
"issuetype": {
"name": "my issue type"
}
}
}
Without the 'customfield_20582' bit - this works perfectly, and i get a response with the newly created Issue key.
If I change the 'customfield' bit to 'High', 'Medium' or 'low' it also works fine.
But when I try to set the value to be the default 'None' i get issues:
"errors": {
"customfield_20582": "Option id 'null' is not valid"
}
"errors": {
"customfield_20582": "Could not find valid 'id' or 'value' in the Parent Option object."
}I've tried:
* "None"
* "Null"
* null
* "-1"
* -1
when I inspect the select element, I see the id is -1 and the value is 'None' - but there must be more to it.
I know if I remove the 'customfield' piece entirely, the default will be used, well, by default - but It would be much easier (because we're using API call templates) to just explicitly specify that it should use the default.
I'd also need to set it back to default later.
How can I specify that the default value be set.
I'm testing these requests in Postman and eventually building them into a Java application.