/build/static/layout/Breadcrumb_cap_w.png

Automatically assign technician to child tickets produced from parent process

We currently have a process that creates a large amount of child tickets and we would like to automatically assign the same technician to the child tickets as are in the parent process. Any help or advice would be appreciated. 


0 Comments   [ + ] Show comments

Answers (2)

Posted by: Hobbsy 4 years ago
Red Belt
1

You should create a custom ticket rule that copies the Assigned Owner ID from the parent down into the all the child tickets. In doing this I would also recommend that you use some kind of switch field so this only happens once, just in case you need to reassign the parent.


Your select would like something like this


SELECT

HD_TICKET.ID,

HD_TICKET.TITLE,

HD_TICKET.CUSTOM_FIELD_VALUE0,

        HD_TICKET.HD_IMPACT_ID,

HD_TICKET.PARENT_ID,

        HD_TICKET.OWNER_ID,

PARENT_TICKET.ID AS P_ID,

PARENT_TICKET.TITLE AS P_TITLE,

PARENT_TICKET.CUSTOM_FIELD_VALUE0 AS P_CUSTOM_FIELD_VALUE0,

        PARENT_TICKET.HD_IMPACT_ID AS P_IMPACT,

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 AND PARENT_TICKET.HD_STATUS_ID =  8


And the update something like

UPDATE

HD_TICKET

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


SET

HD_TICKET.TITLE = PARENT_TICKET.TITLE,

        HD_TICKET.OWNER_ID = PARENT_TICKET.OWNER_ID,

HD_TICKET.CUSTOM_FIELD_VALUE0 = PARENT_TICKET.CUSTOM_FIELD_VALUE0,

        HD_TICKET.HD_IMPACT_ID = PARENT_TICKET.HD_IMPACT_ID

WHERE

HD_TICKET.ID in (<TICKET_IDS>)


Posted by: casnider 1 year ago
White Belt
0

What would the script look like if you only wanted ONE of the child tickets to match the owner of the parent ticket?

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