Not able to update "Status" field using REST api

irfan ali February 2, 2017

I am trying to update the "status" field from "New" ( id -> 1) to "Ready To Start" ( Id -> 10008). Using the below JSON input for the URI : https://jirasupport.example.com/rest/api/2/issue/ATSUPPORT-63172/transitions?expand=transitions.fields . 

 

JSON Input as below:

{
"update": {
"comment": [{
"add": {
"body": "Committed code to SVN."
}
}
]
},
"transition": {
"id": "10008"
}
}

 

I am getting below error:

{
"errorMessages": [
"Internal server error"
],
"errors": {}
}

Can some one please let me know what mistake I am doing here.

Thanks,
Irfan Ali 

2 answers

0 votes
Nurullah Koca June 25, 2019

I fixed it by looking to the needed parameters first by manually trying to reopen a issue. If you reopen issues you need to pass a comment but also an assignee. So my JSON looks like this:

{
"update": {
"comment": [
{
"add": {
"body": "The message"
}
}
]
},
"assignee": {
"name": "user.name"
},
"transition": {
"id": "4"
}
}

 Without an assignee i got the error

0 votes
irfan ali February 3, 2017

I got the answer i was looking for, was passing the wrong id value. 

 

Thanks,
Irfan Ali. 

Suggest an answer

Log in or Sign up to answer