/build/static/layout/Breadcrumb_cap_w.png

Send Email if a ticket is not opened.

Hello People,

Anyone know how to get a "new ticket" to send an email to a supervisor,

if it hasn't been opened by its "owner" for a specified amount of time ?

Is this done via a ticket rule? Not sure here?

Thanks guys


3 Comments   [ + ] Show comments
  • subscribing. we're looking into this same functionality. - Brady Williams 4 years ago
    • Adding a comment won't send you updates. You need to click the Follow button. - chucksteel 4 years ago
  • Do you have supervisors (or managers) stored in the user data? If not, then will the supervisor be hard coded into the notification rule? - chucksteel 4 years ago
    • Yes @chucksteel.
      The supervisor in this case is the head of Department.
      Yes I have him in the list of users imported from LDAP.
      He is just another user with an email like everyone else.
      Does that make it easier? - akmagnum 4 years ago
      • What I meant is, when you look at the user detail for your technicians, is their Manager listed? - chucksteel 4 years ago
  • Hi there @chucksteel.
    The "manager" in the "user detail " was empty. But, yes... the head of IT is listen in the list of users in the drop down list. I can easily populate the field for all my technicians.
    And when I do that ..???? - akmagnum 4 years ago
    • That is just a part of making the rule work. Otherwise you would need to hardcode the manager's email address into the rule. We have managers included in our Active Directory, so when we import via LDAP that field is set for us. - chucksteel 4 years ago

Answers (2)

Posted by: chucksteel 4 years ago
Red Belt
2

This select statement should identify tickets with a status of "New" that have not been updated by their owner in the past four hours:

SELECT T.ID, T.TITLE, T.CREATED, LAST_CHANGE.TIMESTAMP, 
T.OWNER_ID,
OWNER.EMAIL,
MANAGER.EMAIL as MANAGER_EMAIL,
LAST_CHANGE.DESCRIPTION, 
T.TIME_CLOSED,
OWNER.*
FROM ORG1.HD_TICKET T
JOIN HD_TICKET_CHANGE LAST_CHANGE ON LAST_CHANGE.HD_TICKET_ID = T.ID
 and LAST_CHANGE.ID=(select MAX(ID) from HD_TICKET_CHANGE where HD_TICKET_CHANGE.HD_TICKET_ID = T.ID
and HD_TICKET_CHANGE.USER_ID = T.OWNER_ID)
left join HD_STATUS on HD_STATUS_ID = HD_STATUS.ID
left join USER OWNER on OWNER.ID = T.OWNER_ID
left join USER MANAGER on MANAGER.ID = OWNER.MANAGER_ID
WHERE 
OWNER.ID != 0
and HD_STATUS.NAME = 'New' 
and LAST_CHANGE.TIMESTAMP < NOW() - INTERVAL 4 HOUR

It includes a column for MANAGER_EMAIL which will be used for the Email each recipient in query results option. There are some other columns selected that can be used as variables in the email to be sent. 

You can change the interval by modifying the last line "INTERVAL 4 HOUR" (and yes, it is supposed to be singular for the unit).

Set the rule to run on a schedule and the manager will start receiving notifications. If you don't want the manager to receive multiple notifications for a ticket, then you will need to establish a way to know if the notice has already been sent, perhaps with a custom field that is updated.


Comments:
  • Thanks for the update .
    I will try it.... - akmagnum 4 years ago

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ