/build/static/layout/Breadcrumb_cap_w.png

Copy info from Parent to Child rule suddenly stopped working

We have been using the below OTS ticket rule for quite sometime and then just last week it quit working. I run the rule in MySQL and it works but does not work in Kbox.

Here is the Select Query:

SELECT PARENT.CUSTOM_FIELD_VALUE1, HD_TICKET.CUSTOM_FIELD_VALUE1, PARENT.CUSTOM_FIELD_VALUE2, HD_TICKET.CUSTOM_FIELD_VALUE2, 
PARENT.CUSTOM_FIELD_VALUE3, HD_TICKET.CUSTOM_FIELD_VALUE3, 
PARENT.CUSTOM_FIELD_VALUE4, HD_TICKET.CUSTOM_FIELD_VALUE4,
PARENT.CUSTOM_FIELD_VALUE5, HD_TICKET.CUSTOM_FIELD_VALUE5,
PARENT.CUSTOM_FIELD_VALUE0, HD_TICKET.CUSTOM_FIELD_VALUE0, HD_TICKET.ID
FROM HD_TICKET PARENT, HD_TICKET
WHERE PARENT.ID = HD_TICKET.PARENT_ID  

Here is the update query:

UPDATE HD_TICKET PARENT, HD_TICKET 
SET 
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_VALUE0 = PARENT.CUSTOM_FIELD_VALUE0,
WHERE ((PARENT.ID = HD_TICKET.PARENT_ID) AND HD_TICKET.ID = <TICKET_IDS>) 

Any help would be appreciated.




0 Comments   [ + ] Show comments

Answers (1)

Posted by: Mtcook 9 years ago
White Belt
0
Here is what I am using. It is a direct copy and paste. I have more custom fields because this is from my New hire process. 

Select SQL:
SELECT
 PARENT.CUSTOM_FIELD_VALUE0, 
 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 SQL:
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.RESOLUTION = CONCAT(HD_TICKET.RESOLUTION,' Fields Pulled From Parent Ticket.') 
WHERE
((PARENT.ID = HD_TICKET.PARENT_ID) AND HD_TICKET.ID = <TICKET_IDS>)

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ