How do you create a custom rule to send an email for an unassigned ticket?
This might be in another question but I couldn't find it. Is there a way to create a custom ticket rule to email a supervisor for a ticket that has been unassigned for say 3 days or so?
Answer Chosen by the Author
This query will find tickets that are open and unassigned that were created over three days ago:
SELECT "email@example.com" AS NOTIFY, HD_TICKET.* FROM ORG1.HD_TICKET
WHERE OWNER_ID = 0
and TIME_CLOSED = "0000-00-00 00:00:00"
and TIME_OPENED > '3 days';
Change the firstname.lastname@example.org to the user that you would like to notify. You can create a new rule that uses this SQL query. Check the box to Email each recipient in query results and then specify NOTIFY as the Column containing email addresses. You can use the ticket columns as variables in the message, e.g. $title, $summary, etc.
This query does not join to any tables so if you want to include submitter names and such it will have to be modified.
Answered 08/27/2015 by: chucksteel
Please log in to comment
log in to commentPlease