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

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?
    • 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>
  • Have you looked into doing this with Processes?
  • 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.
Please log in to comment

Answers

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>)
Answered 06/22/2015 by: Hobbsy
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity

Share