/build/static/layout/Breadcrumb_cap_w.png

Can you copy comments from parent to child ticket?

I have all the information that I need to copy from the parent to the child ticket but can't seem to get the comments not made by the system to copy to the child tickets. Has anyone else had any luck with that?  I only want the non system generated comments to copy. 

Thanks 


2 Comments   [ + ] Show comments
  • Figured out what the problem was I was using an old ticket but once I created a new one it worked but I want to add comments to copy across anyone figured this out yet? - scarpent 8 years ago
  • This copies the summary in the ticket not the actual comments which is what I am looking for. - scarpent 7 years ago

Answers (1)

Posted by: Hobbsy 8 years ago
Red Belt
1
Below is an example of how we have achieved this functionality

Select Statement
SELECT
HD_TICKET.ID,
HD_TICKET.CUSTOM_FIELD_VALUE0,
HD_TICKET.CUSTOM_FIELD_VALUE5,
        HD_TICKET.SUMMARY,
        HD_TICKET.DUE_DATE,
HD_TICKET.PARENT_ID,
PARENT_TICKET.ID AS P_ID,
        PARENT_TICKET.DUE_DATE AS P_DUE_DATE,
PARENT_TICKET.CUSTOM_FIELD_VALUE0 AS P_CUSTOM_FIELD_VALUE0,
PARENT_TICKET.CUSTOM_FIELD_VALUE5 AS P_CUSTOM_FIELD_VALUE5,
PARENT_TICKET.IS_PARENT

FROM
HD_TICKET
LEFT JOIN HD_TICKET PARENT_TICKET ON HD_TICKET.PARENT_ID = PARENT_TICKET.ID
WHERE
HD_TICKET.PARENT_ID != "" AND HD_TICKET.HD_QUEUE_ID = 1

Update Statement

UPDATE
HD_TICKET
LEFT JOIN HD_TICKET PARENT_TICKET ON HD_TICKET.PARENT_ID = PARENT_TICKET.ID

SET
HD_TICKET.CUSTOM_FIELD_VALUE0 = PARENT_TICKET.CUSTOM_FIELD_VALUE0,
        HD_TICKET.DUE_DATE = PARENT_TICKET.DUE_DATE,
HD_TICKET.CUSTOM_FIELD_VALUE5 = PARENT_TICKET.CUSTOM_FIELD_VALUE5
WHERE
HD_TICKET.ID in (<TICKET_IDS>)

Note that in the select statement it selects data for both the parent and child tickets and then in the update statement copies across the data.

To try this out I suggest you simplify to a single data value and then build up your query from there

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