/build/static/layout/Breadcrumb_cap_w.png

Custom Email Notifications for Updates

We use custom ticket rules for almost all of our email notifications as the built-in variables leave much to be desired. The only built-in one we still use is the update notification. Our users dislike the information that is displayed for $change_desc because the comment gets lost in all the other info (like when we change the status, category, priority, owner, etc...). 

I'd like to do a custom ticket rule for update notifications that displays the last comment made on a ticket by itself. Does anyone know how to query that? I'm fine with writing my own select statements to pull the info I need, but I'm not exactly sure where that info resides or how to tell it to only pull that last comment. 

Thanks!

0 Comments   [ + ] Show comments

Answers (1)

Posted by: chucksteel 6 years ago
Red Belt
2
KACE uses the <CHANGE_ID> variable (substituted at runtime) for the latest change on a ticket. Using that you can get the most recent entry in the HD_TICKET_CHANGE table with this join:
JOIN HD_TICKET_CHANGE THISCHANGE ON THISCHANGE.HD_TICKET_ID = HD_TICKET.ID 
 and THISCHANGE.ID=<CHANGE_ID>

The comment is stored in HD_TICKET_CHANGE.COMMENT.


Comments:
  • Thank you sir! I've had joins on that table before but never really looked at its structure. Now that I see what's in it... man this opens up a whole lot of possibilities that my team is going to love! - ashlea 6 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