K1100 Service Desk: Randomly assign tickets to owners
Is there a way to configure the appliance to randomly assign tickets? Right now, it's defaulting to the DefaultTicketOwners as the owner of a ticket.I prefer it to assign to 2 admins of the appliance. I found something here:
UPDATE HD_TICKET, USER as T5
set HD_TICKET.OWNER_ID = T5.ID
WHERE
(HD_TICKET.ID in (<TICKET_IDS>)) AND
T5.USER_NAME =
CASE MOD(right((UNIX_TIMESTAMP(now())),1),2)+1 /*returns 1 or 2 based off timestamp*/
WHEN 1 THEN 'admin1'
WHEN 2 THEN 'admin2'
ELSE 'admin2'
END
But when I run it, I get this:
mysqli error: [1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '<TICKET_IDS>)) AND T5.USER_NAME = CASE MOD(right((UNIX_TIMESTAMP(now())),1),2)+' at line 4] in EXECUTE("UPDATE HD_TICKET, USER as T5 set HD_TICKET.OWNER_ID = T5.ID WHERE (HD_TICKET.ID in (<TICKET_IDS>)) AND T5.USER_NAME = CASE MOD(right((UNIX_TIMESTAMP(now())),1),2)+1 /*returns 1 or 2 based off timestamp*/ WHEN 1 THEN 'admin1' WHEN 2 THEN 'admin2' ELSE 'admin2' END")
0 Comments
[ + ] Show comments
Answers (2)
Please log in to answer
Posted by:
chucksteel
8 years ago
Posted by:
The_Real_Gary
8 years ago