/build/static/layout/Breadcrumb_cap_w.png

Due Date - From Parent Ticket to Child Ticket

Looking for a way to get items to flow from a Parent Ticket to a Child Ticket - specifically the Due Date field.  We have a Parent ticket for new hires/changes/terminates, that when submitted, creates 3 child tickets, which are farmed out to different members in the IT team.  The Due Date is not coming through for some reason, and is vital to the ticket.

Thanks.

FYI - I do not know SQL at all - so be gentle....lol.

3 Comments   [ + ] Show comments
  • Are you pulling any data through from the parent at this stage, or do you need a custom rule to copy the data across from Parent to child? - Hobbsy 9 years ago
    • We do have a rule in place that pulls a custom field (Position Title) from Parent to Child. I did not create it, so trying to learn how it works.

      Here is what we have:

      select HD_TICKET.ID
      from
      HD_TICKET
      join HD_TICKET_CHANGE HTC on HTC.HD_TICKET_ID = HD_TICKET.ID
      left join HD_TICKET_CHANGE_FIELD HTCF on HTCF.HD_TICKET_CHANGE_ID = HTC.ID
      where
      HD_TICKET.PARENT_ID != 0 /* only for tix with parent set */

      and

      (HD_TICKET.MODIFIED = HD_TICKET.CREATED /* only new tix */

      or

      (HTCF.FIELD_CHANGED = 'PARENT_ID'
      and HTCF.AFTER_VALUE != 0 ) /* or tix that have parent assigned/changed later */
      )
      and HTC.ID = <CHANGE_ID> - hutcha4113 9 years ago
  • Have you looked into doing this with Processes? - jfields 9 years ago
  • Would love to...but I don't know SQL. This rule was not created by me, so I don't really have an idea of where to look. - hutcha4113 9 years ago

Answers (1)

Posted by: Hobbsy 9 years ago
Red Belt
0
So we have set up a rule that will copy data from the parent to the child, I have updated it so that it also includes the Due Date field as requested. So you may want to remove the custom fields

Select Statement

SELECT
HD_TICKET.ID,
HD_TICKET.CUSTOM_FIELD_VALUE0,
HD_TICKET.CUSTOM_FIELD_VALUE5,
        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 AND PARENT_TICKET.CUSTOM_FIELD_VALUE0 = 'High'

Update

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>)

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