It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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 Dec 20, 2019

Hi @vkalakuntla ,

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)

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
Community showcase
Published in Opsgenie

Authentication Options for Atlassian’s Opsgenie

What’s New as of May 21, 2020 Hi there! We recently made some changes to the way you can leverage Single-sign on and authorization within Opsgenie. Based on customer preference and feedback we intr...

144 views 1 3
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you