Problems updating the status of a ticket using python

回答済み


投稿日時:2023年11月29日

Hi, I am trying to make a script using the Zenpy Python library in which I want to change the status automatically of some tickets to "Solved", my problem is that I receive the following error when I run the script:

Error updating ticket: {"error": "RecordInvalid", "description": "Record validation errors", "details": {"custom_status_id": [{"description": "Custom status is invalid", "error": " InvalidValue"}]}}


I have verified that the ID of the "Solved" status is correct, but I still have the same result.

Objects and rules > Tickets > Ticket statuses > Edit ticket status > 13315929

Edit ticket status

Default

View and edit your ticket status details

Solved

"custom_status_id": 13315929

This is the part of the code that generates the error:

SOLVED = 13315929

# Retrieve the open ticket

             open_ticket = zenpy_client.tickets(id=str(open_ticket_id))

           

            # Set the required fields before updating the status

             open_ticket.ticket_type = 'Problem'

             open_ticket.priority = 'Normal'

             open_ticket.status = 'Solved'

             open_ticket.custom_status_id = SOLVED

       

             # Update the open ticket

             zenpy_client.tickets.update(open_ticket)

0

2

0件のコメント

サインインしてコメントを残します。

お探しのものが見つかりませんか?

新規投稿