I was wondering how to set the priority and the component fields of an issue when creating it through the REST API.
If put this:
{
"fields": {
"project": {
"id": "10000"
},
"summary": "'te'te",
"description": "e'reserg",
"issuetype": {
"id": "1"
}
}
}
everything goes fine. If I put this:
{
"fields": {
"project": {
"id": "10000"
},
"summary": "'te'te",
"description": "e'reserg",
"issuetype": {
"id": "1"
},
"priority": {
"id": "1"
},
"component": {
"id": "10000"
}
}
}
I get a 400 response (Bad request). I don't understand what is wrong.
Community moderators have prevented the ability to post new answers.
Ok, I found the issue. Actually, the component is an array and logically the attribute name is plural (components). So to fix this, it should rather be:
{
"fields": {
"project": {
"id": "10000"
},
"summary": "'te'te",
"description": "e'reserg",
"issuetype": {
"id": "1"
},
"priority": {
"id": "1"
},
"components": [{
"id": "10000"
}]
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Guillaume Polet,
what URL you used to set values in Component ?
is it PUT or POST and please let me know url also for an issue.
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.