Copy Parent to Child - Append Ticket Title to Child Tickets
Hello,
I am looking for a way to append the ticket title of the parent ticket to the title in the child tickets. Here is what we are currently doing, and it seems to be working for all other fields:
SELECT
PARENT.CUSTOM_FIELD_VALUE1,
HD_TICKET.TITLE,
HD_TICKET.ID
FROM
HD_TICKET PARENT, HD_TICKET
WHERE
PARENT.ID = HD_TICKET.PARENT_ID
AND HD_TICKET.RESOLUTION not like '%Fields Pulled From Parent Ticket%'
PARENT.CUSTOM_FIELD_VALUE1,
HD_TICKET.TITLE,
HD_TICKET.ID
FROM
HD_TICKET PARENT, HD_TICKET
WHERE
PARENT.ID = HD_TICKET.PARENT_ID
AND HD_TICKET.RESOLUTION not like '%Fields Pulled From Parent Ticket%'
UPDATE
HD_TICKET PARENT,
HD_TICKET
SET
HD_TICKET.CUSTOM_FIELD_VALUE0 = PARENT.CUSTOM_FIELD_VALUE0,
HD_TICKET.CUSTOM_FIELD_VALUE1 = PARENT.CUSTOM_FIELD_VALUE1,
HD_TICKET.CUSTOM_FIELD_VALUE2 = PARENT.CUSTOM_FIELD_VALUE2,
HD_TICKET.CUSTOM_FIELD_VALUE3 = PARENT.CUSTOM_FIELD_VALUE3,
HD_TICKET.CUSTOM_FIELD_VALUE4 = PARENT.CUSTOM_FIELD_VALUE4,
HD_TICKET.CUSTOM_FIELD_VALUE5 = PARENT.CUSTOM_FIELD_VALUE5,
HD_TICKET.CUSTOM_FIELD_VALUE6 = PARENT.CUSTOM_FIELD_VALUE6,
HD_TICKET.CUSTOM_FIELD_VALUE7 = PARENT.CUSTOM_FIELD_VALUE7,
HD_TICKET.CUSTOM_FIELD_VALUE8 = PARENT.CUSTOM_FIELD_VALUE8,
HD_TICKET.CUSTOM_FIELD_VALUE9 = PARENT.CUSTOM_FIELD_VALUE9,
HD_TICKET.CUSTOM_FIELD_VALUE10 = PARENT.CUSTOM_FIELD_VALUE10,
HD_TICKET.CUSTOM_FIELD_VALUE11 = PARENT.CUSTOM_FIELD_VALUE11,
HD_TICKET.CUSTOM_FIELD_VALUE12 = PARENT.CUSTOM_FIELD_VALUE12,
HD_TICKET.CUSTOM_FIELD_VALUE13 = PARENT.CUSTOM_FIELD_VALUE13,
HD_TICKET.RESOLUTION = CONCAT(HD_TICKET.RESOLUTION,' Fields Pulled From Parent Ticket.')
WHERE
((PARENT.ID = HD_TICKET.PARENT_ID) AND HD_TICKET.ID = <TICKET_IDS>)
HD_TICKET PARENT,
HD_TICKET
SET
HD_TICKET.CUSTOM_FIELD_VALUE0 = PARENT.CUSTOM_FIELD_VALUE0,
HD_TICKET.CUSTOM_FIELD_VALUE1 = PARENT.CUSTOM_FIELD_VALUE1,
HD_TICKET.CUSTOM_FIELD_VALUE2 = PARENT.CUSTOM_FIELD_VALUE2,
HD_TICKET.CUSTOM_FIELD_VALUE3 = PARENT.CUSTOM_FIELD_VALUE3,
HD_TICKET.CUSTOM_FIELD_VALUE4 = PARENT.CUSTOM_FIELD_VALUE4,
HD_TICKET.CUSTOM_FIELD_VALUE5 = PARENT.CUSTOM_FIELD_VALUE5,
HD_TICKET.CUSTOM_FIELD_VALUE6 = PARENT.CUSTOM_FIELD_VALUE6,
HD_TICKET.CUSTOM_FIELD_VALUE7 = PARENT.CUSTOM_FIELD_VALUE7,
HD_TICKET.CUSTOM_FIELD_VALUE8 = PARENT.CUSTOM_FIELD_VALUE8,
HD_TICKET.CUSTOM_FIELD_VALUE9 = PARENT.CUSTOM_FIELD_VALUE9,
HD_TICKET.CUSTOM_FIELD_VALUE10 = PARENT.CUSTOM_FIELD_VALUE10,
HD_TICKET.CUSTOM_FIELD_VALUE11 = PARENT.CUSTOM_FIELD_VALUE11,
HD_TICKET.CUSTOM_FIELD_VALUE12 = PARENT.CUSTOM_FIELD_VALUE12,
HD_TICKET.CUSTOM_FIELD_VALUE13 = PARENT.CUSTOM_FIELD_VALUE13,
HD_TICKET.RESOLUTION = CONCAT(HD_TICKET.RESOLUTION,' Fields Pulled From Parent Ticket.')
WHERE
((PARENT.ID = HD_TICKET.PARENT_ID) AND HD_TICKET.ID = <TICKET_IDS>)
We are requiring the employee name in the parent ticket title, and would like it to filter down through. Any assistance here would be greatly appreciated.
Nick
0 Comments
[ + ] Show comments
Answers (1)
Please log in to answer
Posted by:
Hobbsy
6 years ago