Hi all,
As a title say, I am trying to change the jira status using REST API.
I have written a small script. Unfortunately, it is not working as expected.
Can anyone look into script and let me know if I am missing something?
url = "https://domain-name.atlassian.net/rest/api/2/issue/{id}/transitions?expand=transitions.fields"
headers = {
"Accept": "application/json"
}
json_data = {
"update": {
"comment": [
{
"add": {
"body": "Issue is rejected."
}
}
]
},
"transition": {
"id": "161"
}
}
for issue_id in issue_ids:
response = requests.request(
"POST",
url.format(id=issue_id),
data=json.dumps(json_data),
headers=headers,
auth=auth
)
This is a duplicate of your earlier question:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.