atlassian-python-api
atlassian-python-api copied to clipboard
Transition issue not working
I have tried the following code but it is not working for me. It does not show any error message either
jira = JIRA(
url=f"{constants.URL}",
username=f"{constants.JIRA_USERNAME}",
password=f"{constants.JIRA_API_TOKEN}",
)
print(f"BEFORE- ISSUE STATUS: {jira.get_issue_status(issue_key)}")
updated_status = 'In Progress'
print(f"updating status to: {updated_status}")
jira.issue_transition(issue_key, updated_status)
print(f"AFTER- ISSUE STATUS: {jira.get_issue_status(issue_key)}")
Output: BEFORE- ISSUE STATUS: To Do updating status to: In Progress AFTER- ISSUE STATUS: To Do
jira.set_issue_status(issue_key, updated_status) does not work either
Hi! could you try to use the transition id please ?
https://github.com/atlassian-api/atlassian-python-api/blob/fc18646125ee397364d8d2a0e9a4f61b7e9d5421/atlassian/jira.py#L1346
Hi @gonchik !
Unfortunately it did not work for me:
print(f"BEFORE- ISSUE STATUS: {jira.get_issue_status(issue_key)}")
updated_status = 'In Progress'
transition_id = 121
print(f"updating status to: {updated_status}")
jira.set_issue_status_by_transition_id(issue_key, 121)
print(f"AFTER- ISSUE STATUS: {jira.get_issue_status(issue_key)}")
If it helps, here is output from print(jira.get_issue_transitions(issue_key)):
[{'name': 'In Progress', 'id': 121, 'to': 'In Progress'}, {'name': 'Approval Required', 'id': 131, 'to': 'Pending Approval'}]
I am also tracking here https://github.com/pycontribs/jira/issues/1303
Debugged it with a teammate- it was because the URL was
url='http://
not
url='https://