TicketUpdate returning as expected but tickets are not moved to a different queue

Moderator: crythias

Post Reply
ATD39401
Znuny newbie
Posts: 21
Joined: 28 Jun 2024, 14:38
Znuny Version: 6.0.44
Real Name: Amber Denton
Company: UTK College of Veterinary Medicine

TicketUpdate returning as expected but tickets are not moved to a different queue

Post by ATD39401 »

Hello all! I am writing some Python scripts for our ticket system, and I'm currently writing one to automatically move tickets of a certain age or older from a queue called "ECommunications" to one called "Misc" without changing any other properties of the ticket. Below is the config file for the web service I'm using.
MoveFailedFaxes.yml
I'm able to grab ticket IDs and extract the data from the tickets that I need to determine which ones to move just fine. I'm trying to call my TicketUpdate operation as shown below.

Code: Select all

reqHeaders = {'Accept': 'application/json', 'charset': 'UTF-8', 'Content-Type': 'application/json'}
OTRShost = [ADDRESS FOR TICKET SYSTEM]
webservice = '[ADDRESS FOR TICKET SYSTEM]/otrs/nph-genericinterface.pl/Webservice/MoveFailedFaxes'

urlForAPI = webservice + '/TicketUpdate?'
params = {
	'UserLogin': OTRSLogin,
	'Password': OTRSPassword,
	'TicketID': ticketID,
	'Ticket': {
		'Title': ticketTitle,
		'Queue': 'Misc',
		'State': 'open',
		'PriorityID': 3
	}
}
response = rpost(url=urlForAPI, params=params, headers=reqHeaders)
I'm not seeing any errors return from the TicketUpdate call, but when I check the ticket system the things I wanted moved to "Misc" are still in the "ECommunications" queue. Any advice on what I may be doing wrong?
You do not have the required permissions to view the files attached to this post.
Post Reply