I have a few fields that I am trying to pass from a parent ticket to a child ticket in the KACE Service Desk.  The fields that I need passed down are "Status", "Owner", and "Resolution". Can someone help me with the queries for this?
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answers

1
Hello Bho1417,

to set the same owner from the parent ticket to the child ticket, I have the following customrule:
(The rule is in the parentticket queue)

sql-select:
SELECT HD_TICKET.ID, HD_STATUS.NAME, HD_STATUS.STATE, FILTER.CSTATE
FROM HD_TICKET
JOIN HD_STATUS on (HD_STATUS.ID = HD_TICKET.HD_STATUS_ID)
JOIN
(SELECT HD_TICKET.ID, GROUP_CONCAT(CHILD.STATE) AS CSTATE
FROM HD_TICKET
JOIN HD_STATUS on (HD_STATUS.ID = HD_TICKET.HD_STATUS_ID)
JOIN
(SELECT HD_TICKET.ID, HD_STATUS.STATE, HD_TICKET.PARENT_ID
FROM HD_TICKET
JOIN HD_STATUS on (HD_STATUS.ID = HD_TICKET.HD_STATUS_ID)
WHERE HD_TICKET.PARENT_ID != 0)
CHILD ON (CHILD.PARENT_ID = HD_TICKET.ID)
WHERE HD_TICKET.IS_PARENT != 0
GROUP BY HD_TICKET.ID)
FILTER ON (FILTER.ID = HD_TICKET.ID)
WHERE HD_STATUS.STATE not rlike 'closed'

sql-select:
UPDATE HD_TICKET, HD_TICKET CHILD
SET
CHILD.OWNER_ID = HD_TICKET.OWNER_ID
WHERE
CHILD.PARENT_ID = (<TICKET_IDS>) AND
HD_TICKET.ID = (<TICKET_IDS>)

hope it helps!
Answered 10/04/2016 by: svmay
Sixth Degree Black Belt

Please log in to comment
Answer this question or Comment on this question for clarity