I am trying close all the JIRA tickets on post-receive hook. My python script is executing on post-receive, from commit message I am able to get JIRA ticket number and found the ticket in JIRA also.
All it is working fine but when I want to change status of JIRA ticket with below code getting error 400 bad request response from JIRA server.
jira.transition(issue,'31')
also tried giving 500 internal server error.
jira.transition_issue(issue, '5', assignee={'name': 'pm_user'}, resolution={'id': '3'})
Please help me how to change the status of the ticket. Authentication with JIRA and finding ticket with
issue = jira.issue(issuekey)
is also successful but unable to change the ticket status to "Done".