i'm creating issues using api rest using https://todo1jira.atlassian.net/rest/api/latest/issue/
this one works perfect
=========================================================
curl -i --location --request POST "https://todo1jira.atlassian.net/rest/api/latest/issue/" --header "X-Atlassian-Token: no-check" --header "Accept: application/json" --header "Authorization: Basic XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX=" --header "Content-Type: application/json" --data-raw "{""fields"": { ""project"": { ""key"": ""xxxxx"" }, ""customfield_23797"": ""890918159"", ""customfield_23468"": ""2021-07-01"", ""customfield_23469"": ""2021-07-31"", ""summary"": ""este ticket lo estoy creando como el viejo cami"", ""issuetype"": { ""id"": ""xxxxxxx"" } }}"
=========================================================
but when the custom field is a multi value I'm not getting the way to do it
for example I have a custom field 10304 and need to pick "DRC" (id 12900)
"customfield_10304": {
"required": true,
"schema": {
"type": "array",
"items": "option",
"custom": "com.atlassian.jira.plugin.system.customfieldtypes:multiselect",
"customId": 10304
},
"name": "Ambiente",
"key": "customfield_10304",
"hasDefaultValue": false,
"operations": [
"add",
"set",
"remove"
],
"allowedValues": [
{
"self": "https://todo1jira.atlassian.net/rest/api/2/customFieldOption/29017",
"value": "Azure o CLoud",
"id": "29017"
},
{
"self": "https://todo1jira.atlassian.net/rest/api/2/customFieldOption/12900",
"value": "DRC",
"id": "12900"
},
i'm having this error :
{"errorMessages":[],"errors":{"Ambiente":"Specify the value for Ambiente in an array"}}
when I try to create the issue with:
curl -i --location --request POST "https://todo1jira.atlassian.net/rest/api/latest/issue/" --header "X-Atlassian-Token: no-check" --header "Accept: application/json" --header "Authorization: Basic XXXXXXXXXXXXXXXXXXXX=" --header "Content-Type: application/json" --data-raw "{""fields"": { ""project"": { ""key"": ""XXXXXXXXX"" },""customfield_10041"":{""value"":""Administration""},""customfield_10304"":{""value"":[""DRC""]}, ""summary"": ""este es un tciekt de prueba para creacion automatica"", ""issuetype"": { ""id"": ""18"" }}}"
any advise? thanks