Help with Custom SQL for ticket rule
I need to have custom ticket rule that gets the title of parent ticket and appends it to the child ticket based on the category of the ticket upon save..
If parent ticket title says "New Hire Some guys name blah blah" then if the child ticket has category of "Phone Ext" then take the title from the parent and add "-Phone" to it.. so the child title will be "New Hire Some guys name blah blah-Phone" or "Phone-New Hire Some guys name blah blah" either way would work...
I have tried some of what I found at KACE Product Support : Have K1000 use the same title for all tickets in a process (itninja.com) but even the select query
HD_TICKET PARENT, HD_TICKET
PARENT.ID = HD_TICKET.PARENT_ID
Does not show any results, even though there is parent & child tickets in the queue
Any assistance will be greatly appreciated..
You could create a ticket rule that just runs a concatenate and joins the fields together, something like, if the second value is Custom field 1?
HD_TICKET.TITLE = CONCAT((SELECT HD_TICKET.TITLE),
WHERE(HD_TICKET.HD_STATUS_ID = 63)
AND (HD_TICKET.HD_QUEUE_ID = 9)
You will just need to set the WHERE statement to only run specifically on the child tickets that you want to update
What I ended up doing....
The reason I originally wanted to take the title form the parent ticket and append info for the child tickets.. is
When you create a process that automatically creates the parent & child tickets you CAN NOT copy the title & Summary from the parent upon creation unless they are in the same queue... so this is why I was trying to do it this way...
However.. what I found to work better was:
1. Create the process with all 4 (1 parent & 3 child) tickets all in the same queue.. & copy the title & summary as well as set the categories for each child
2. custom rule to move the parent ticket to a separate parent queue.. (will close automatically when last child is closed)
3. 3 custom rules that check the category, and appends the title with extra text based upon the category