I am at a loss trying to figure out why I'm getting a 405:
for issue in issues:
issue_key = issue["key"]
issue_type = issue["fields"]["issuetype"]["name"]
resolution = "Fixed" if issue_type == "Bug" else "Done"
payload = json.dumps({"issueIdOrKey": issue_key,
"transition": {
"id": "71"
},
"fields": {
"resolution": {
"name": resolution
}
}})
r = requests.put("https://<domain>.atlassian.net/rest/api/3/issue/" + issue_key + '/transitions',
auth=auth_string,
headers={"Content-Type": "application/json",
"Accept": "application/json"},
data=payload)
print(r.status_code)
I've verified via the transitions GET endpoint that transition 71 is the id for the transition whose status I want, and the resolution value is being populated correctly. I've also tried using both "fields" and "update," as well as both resolution name and id.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.