I'm creating issue via API call in Jira Service Management which works fine.
Now I want to add the organization on moment of creation, but can not get this working. I figured out that customfield_10500 is holding the organization, but trying to set in via the API call keeps ending in the following error:
{"errorMessages":[],"errors":{"customfield_10500":"The Organization ID must be a number"}}My (sanitized) API-call:
curl --request POST \
--url 'https://xxxxxxx.atlassian.net/rest/api/3/issue' \
-H "Authorization: Basic xxxxxxx" \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"fields": {
"summary": "This is createdvia an API call",
"issuetype": {
"id": "10285"
},
"project": {
"key": "xxx"
},
"customfield_10500": [
{
"ID": 4
}
],
}
}'
I tried to put the organization id between quotes, square brackets and using the name. But no luck until now.
Once the issue is created I can set the organization manual, but that is a manual intervention I want to avoid :-)