Hi Guys,
I'm struggling to change the status for a ticket using the REST-API.
I thought I needed to find the ID from the Issue key, and I do find an ID, but not the ID apparently needed to change the status.
I could be doing something dumb here, but any help would be appreciated.
Step 1: Find the Ticket
TICKET_STRING = r".../rest/api/2/issue/" #... is replaced with my JIRA tracker instace
link = TICKET_STRING + self.ticket
response = requests.get(link, headers=self.headers)
dictResponse = json.loads(response.content.decode("utf-8"))
self.ticket_id = dictResponse["id"]
Step 2: Change Status with ID
XRAY_STRING = r".../rest/raven/1.0/api/testrun/" #It is of type testrun, but not sure if that is really needed here.. I tried with TICKET_STRING but it also didn't work.
link = XRAY_STRING + self.ticket_id + "/status?status=" + status
response = requests.put(link, headers=self.headers)
But with response, I get ERROR: b'Test Run with Id #### was not found in the server' #where the symbols are of course replaced with the ID I found in Step1
Also, just in case it is relavent, but I don't think it is for the issue I'm facing:
self.headers = {
"Authorization": "Basic " + self.user_password,
"Content-Type": "application/json",
"Accept": "application/json",
"X-Atlassian-Token": "no-check",
}