Unable to update issue status to "Closed" using JIRA API..

Deleted user December 20, 2019

Hi All,

I am trying to update the issue status to "Closed" by using REST API format (https://abc/rest/api/3/issue/{IssueKey}/transitions?expand=transitions.fields)

and using the below Json 

{
"update": {},
"transition": {
"id": "241"
},
"fields": {
"resolution": {
"name": "Done"
}
}
}

Able to update to other status (Postpone,Resolved,etc..) , but trying to avoid multiple transitions from my code. when i use the above url and JSON it is giving me this error..

"The remote server returned an error: (400) Bad Request." 

This is very frustrating. Pls anyone help me!!

 

Thanks

Vishnu

 

1 answer

0 votes
Hana Kučerová
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 20, 2019

Hi @[deleted] ,

I tried to perform the REST api call using provided JSON and URL (just changed transition id) and everything worked fine for me - JSON format and URL seems right.

Did you try to perform the call without the field resolution? I was able to get error 400 (which basically means that something is wrong with the data), when the field Resolution wasn't on appropriate screen ("Field 'resolution' cannot be set. It is not on the appropriate screen, or unknown.").

It would be great to get also the error message, not just the error code. I often use application Postman for debugging of such requests (it is easy to set up the request and you can get much more information about it, including the complete response)

Deleted user December 21, 2019

Hi Hana,

Thanks for your reply.

Did you try to perform the call without the field resolution? 

No, i have included the call with field resolution. Actually when i migrate records from CQ to JIRA , Field Resolution is "Unresolved or N/A" , it is because of the workflow in Jira. As the workflows starts and Status is "Submitted" and Resolution is "N/A" for all defects.

Now i am trying to change the Status as "Closed" and Resolution is "Done.But i couldn't, let me get the complete error message. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events