How to mark a JIRA issue as resolved or closed via its REST API (version 2) using Python?
I found the documentation at http://docs.atlassian.com/jira/REST/latest/#id199544 but I had various errors including:
- HTTP Error 415: Unsupported Media Type
- HTTP Error 400
After search for a long time I found the solution, which I’m posting here for anyone else who’s interested in making a Git/Gerrit hook to do such thing like me:
First open
http://example.com/rest/api/2/issue/<ISSUE>/transitions?expand=transitions.fieldsin your browser for your website and issue number to find the transition ID.Supposing it’s 1000:
You can completely omit the comment section if you don’t wish to add a comment.