Hi All
I have the same issue and can not solve it a have a day I need to change a status on Resolved and point Declined for this status I use python api for thatMe code looks like this
def decline_issue_status(self, firing_issue: Issue, resolved_issue: Issue):
status: Status = firing_issue.get_field("status")
if status.id in ('10004','10019','10008'):
self.add_label_for_grafana(firing_issue,resolved_issue)
self.client.transition_issue(firing_issue,transition='71',resolution = {"id": "6","name": "Done"}, comment="Done") #resolution = {"id": "5","name": "Обработано"}
print(status)
When I run it I got exception like that
File "/home/fife/app/python/to_move_project/epm-sdl1/apps/schedule/jira_job_processing.py", line 105, in decline_issue_status
self.client.transition_issue(firing_issue,transition='71',resolution = {"id": "6","name": "Done"}, comment="Done") #resolution = {"id": "5","name": "Обработано"}
File "/home/fife/app/python/project/epmc-acm30-ticket-triage-engine/venv/lib/python3.10/site-packages/jira/client.py", line 123, in wrapper
result = func(*arg_list, **kwargs)
File "/home/fife/app/python/project/epmc-acm30-ticket-triage-engine/venv/lib/python3.10/site-packages/jira/client.py", line 2217, in transition_issue
r = self._session.post(url, data=json.dumps(data))
File "/home/fife/app/python/project/epmc-acm30-ticket-triage-engine/venv/lib/python3.10/site-packages/requests/sessions.py", line 637, in post
return self.request("POST", url, data=data, json=json, **kwargs)
File "/home/fife/app/python/project/epmc-acm30-ticket-triage-engine/venv/lib/python3.10/site-packages/jira/resilientsession.py", line 246, in request
elif raise_on_error(response, **processed_kwargs):
File "/home/fife/app/python/project/epmc-acm30-ticket-triage-engine/venv/lib/python3.10/site-packages/jira/resilientsession.py", line 71, in raise_on_error
raise JIRAError(
jira.exceptions.JIRAError: JiraError HTTP 400 url: https://epamservicedesk-sandbox-161.atlassian.net/rest/api/2/issue/VUESS-765/transitions
text: Не удается переместить (VUESS-765). У вас может не быть прав, или в задаче недостает необходимой информации. Если эта задача осталась, обратитесь к администратору Jira.
response headers = {'Date': 'Tue, 23 Jan 2024 10:16:43 GMT', 'Content-Type': 'application/json;charset=UTF-8', 'Server': 'AtlassianEdge', 'Timing-Allow-Origin': '*', 'X-Arequestid': '32a3e2ead7a8048cf9e9e40927080c61', 'X-Aaccountid': '712020%3A34dba71e-5d38-450a-ab31-af25a7bbe9d0', 'Cache-Control': 'no-store, no-cache', 'X-Content-Type-Options': 'nosniff', 'X-Xss-Protection': '1; mode=block', 'Atl-Traceid': 'e1e41298def640af86b37a8a42056bad', 'Report-To': '{"endpoints": [{"url": "https://dz8aopenkvv6s.cloudfront.net"}], "group": "endpoint-1", "include_subdomains": true, "max_age": 600}', 'Nel': '{"failure_fraction": 0.001, "include_subdomains": true, "max_age": 600, "report_to": "endpoint-1"}', 'Strict-Transport-Security': 'max-age=63072000; includeSubDomains; preload', 'Vary': 'Accept-Encoding', 'Content-Encoding': 'gzip', 'Transfer-Encoding': 'chunked'}
response text = {"errorMessages":["Не удается переместить (VUESS-765). У вас может не быть прав, или в задаче недостает необходимой информации. Если эта задача осталась, обратитесь к администратору Jira."],"errors":{}}
I second days try fixing this but I could not I tried to use different variations of resolution and fields. User can change status by manual in web portal that I am using
Hi,
Welcome to the community
Can you make sure that you're using the correct transition id. Are you using the jira module for python ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.