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. 

0 Comments   [ + ] Show Comments


Please log in to comment


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:

The comment is stored in HD_TICKET_CHANGE.COMMENT.

Answered 12/09/2014 by: chucksteel
Red Belt

  • 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!
Please log in to comment
Answer this question or Comment on this question for clarity