a Ticket rule to manage Ticket rules (one rule to rule the rules!)
I want to use multiple queues within my company, but a question of maintenance comes up: How do you manage your ticket rules?
The two queues are going to be identical in functionality (just different categories) but for rules that run on frequency RUN ON TICKET SAVE are only triggered when a ticket is saved within the queue the ticket rule exists. Timed rules I can set to run in multiple queues without issue.
Because of this I have to duplicate ON TICKET SAVE rules between the queues, which leads to the management issue. If I update one ticket, that means I have to update the other (or more!).
My idea is to have a ticket rule that runs on a schedule (or just a RUN NOW rule) that takes the ticket rule in HD_QUEUE_ID 1 and, if the ticket rule in queue 10 has the same TITLE as the one in queue 1, updates it to match.
So, the idea is born, but I am of neophyte rank with SQL. Although I've done a good job working around the USER and HD_TICKET tables, I stretch my knowledge picking through a SINGLE table and checking itself.
select distinct HD_TICKET_RULE.TITLE,
PARENT.TITLE as PARENT_TITLE,
PARENT.HD_QUEUE_ID as PARENT_QUEUE_ID,
join HD_TICKET_RULE PARENT on PARENT.TITLE = HD_TICKET_RULE.TITLE
So, there is what I have, which isn't much at all.
In paradise I want the select query to find the PARENT ticket rule (which is going to be in HD_QUEUE_ID = 1) and then find the child ticket rules (which are in HD_QUEUE_ID <>1) and then match the parent's SELECT_QUERY and UPDATE_QUERY and EMAIL_BODY to the child's, based on the HD_TICKET_RULE.TITLE matching.
make sense? Help?
There are no answers at this time