How do you force Parent to Child field updates in the Service Desk
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
Answers (1)
Please log in to answer
Posted by:
svmay
8 years ago
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:
sql-select:
hope it helps!
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!