使用像python-otrs或pyotrs这样的rest/soap API可以关闭票证吗?
使用python-otrs时,我尝试接收到一个错误:
otrs.client.SOAPError: TicketUpdate: Ticket->StateID or Ticket->State parameter is invalid! (TicketUpdate.InvalidParameter)我尝试的代码是:
from otrs.ticket.template import GenericTicketConnectorSOAP
from otrs.client import GenericInterfaceClient
from otrs.ticket.objects import Ticket, Article, DynamicField, Attachment
server_uri = r'https://www.example.com'
webservice_name = 'GenericTicketConnectorSOAP'
client = GenericInterfaceClient(server_uri, tc=GenericTicketConnectorSOAP(webservice_name))
# user session
client.tc.SessionCreate(user_login='user', password='pass')
t_upd = Ticket(State='closed',StateID='3')
client.tc.TicketUpdate(3657,ticket=t_upd)其中3657是票证的id。
谢谢,jp
发布于 2018-11-21 16:39:05
我认为正确的州名称是closed successful,但您不需要同时添加名称和ID,只需其中之一就足够了。
发布于 2020-04-28 13:08:39
请参考后台使用的密钥。你也可以在管理状态下进行检查/匹配。参数的值应始终与状态表中使用的唯一键匹配。
https://stackoverflow.com/questions/51957413
复制相似问题