/build/static/layout/Breadcrumb_cap_w.png
10/19/2016 778 views
Hi Guys,

I have created a process that creates 3 Stages of Child Tickets. I have also created CTR's that push fields from the parent to the children on the parent's save.  These rules push certain values to each child ticket created. One the Stage 1 Child Tickets the rules work just fine.  I save the parent, it creates children, and pushes the appropriate data down to them.  The problem occurs with the Stage 2 Child Tickets.  When I close all of the Stage 1 Tickets and Stage 2 kicks off, it doesn't trigger the save event for the parent ticket and it doesn't push down the values for the children. I know I could work around this by running my CTR's from the child queue and having them pull the values on the Child Saves. I'm hoping to force the Parent Save Event to avoid having a process that involves a bunch of CTR's in 2 different queues for the same process. Mostly because I am running a process with that creates children in 4 different queues and would make keeping track of my CTR's pretty convoluted across all the queues.  Is there a way that I can force the Parent Ticket to save again after the Stage 2 Tickets kick off?

My current thought is that I could make a rule that changes the Parent Resolution upon a particular Child Save. But am totally uncertain as to what might kick off a save other than pressing the pretty blue save button.  Any thoughts?
Answer Summary:
0 Comments   [ + ] Show comments

Comments


Answer Chosen by the Author

2
I don't know if this can help you. I have a custom rule that close the parent ticket when the child ticket get closed.
Maybe it helps you and gives you an idea for solving your problem.

sql-select:
SELECT		HD_TICKET.ID,
HD_TICKET.TITLE,
HD_TICKET.SUMMARY,
HD_TICKET.OWNER_ID,
HD_TICKET.SUBMITTER_ID,
HD_TICKET.HD_STATUS_ID,
CHILDSTATUS.STATE,


PARENT.TITLE,
PARENT.SUMMARY,
PARENT.OWNER_ID,
PARENT.HD_STATUS_ID,
PARENTSTATUS.STATE

FROM HD_TICKET

LEFT JOIN HD_STATUS AS CHILDSTATUS
ON CHILDSTATUS.ID = HD_TICKET.HD_STATUS_ID
LEFT JOIN HD_TICKET AS PARENT
ON PARENT.ID = HD_TICKET.PARENT_ID
LEFT JOIN HD_STATUS AS PARENTSTATUS
ON PARENTSTATUS.ID = PARENT.HD_STATUS_ID

WHERE HD_TICKET.IS_PARENT = 0 AND
PARENT.HD_QUEUE_ID = 13 AND
CHILDSTATUS.STATE = 'closed'

sql-update:

UPDATE	HD_TICKET PARENT, HD_TICKET, HD_STATUS

SET
PARENT.HD_STATUS_ID = HD_STATUS.ID,
PARENT.RESOLUTION = 'Closed',
PARENT.TIME_OPENED = IF(HD_STATUS.STATE = 'opened', NOW(), PARENT.TIME_OPENED),
PARENT.TIME_CLOSED = IF(HD_STATUS.STATE = 'closed', NOW(), PARENT.TIME_CLOSED),
PARENT.TIME_STALLED = IF(HD_STATUS.STATE = 'stalled', NOW(), PARENT.TIME_STALLED),
PARENT.SATISFACTION_RATING = IF(HD_STATUS.STATE = 'closed', NULL, PARENT.SATISFACTION_RATING),
PARENT.SATISFACTION_COMMENT = IF(HD_STATUS.STATE = 'closed', NULL, PARENT.SATISFACTION_COMMENT)

WHERE HD_STATUS.NAME = 'Closed' AND
PARENT.HD_QUEUE_ID = HD_STATUS.HD_QUEUE_ID AND
PARENT.ID = HD_TICKET.PARENT_ID AND
HD_TICKET.ID = (<TICKET_IDS>)





Answered 10/31/2016 by: svmay
Red Belt

  • Thank you for the answer, It does provide some help. I have figured out a way around the problem after going through on-site training. But your code actually answers another question I had yet to ask. So, Thanks!
    • Its nice to know, that I could help you!