Hello,

I was wondering if there is a way to somehow add ticket comments to the ticket change notification.  An example of this is that if the user updates their ticket via email, I would like to see that comment in the change notification instead of having to go to the service desk to look at the ticket.  I have added "$ticket_history" to the ticket change notification email but that shows a lot of information and I would like to limit that to just the comments made in the ticket.

Thanks for your help.

0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answers

0

On ticket save, CHANGE_ID is populated for custom rules with whatever change was made.

You can display whatever comment was made in that specific change as well as the change description which would be for other fields that changed. 

A query something like this would do that:

SELECT HD_TICKET.ID AS ID,HD_TICKET.TITLE, SUBMITTER.FULL_NAME AS SUBMITTER_FNAME, C.COMMENT,C.DESCRIPTION from HD_TICKET
LEFT JOIN USER SUBMITTER ON SUBMITTER.ID = HD_TICKET.SUBMITTER_ID
JOIN HD_TICKET_CHANGE C ON C.HD_TICKET_ID = HD_TICKET.ID AND C.ID=<CHANGE_ID>

email body:

Title: $title
Ticket: $id
From: $submitter_fname
$description
$comment


This would not display all comments.  It might be possible to do a subquery and concatenate all comments though.  Ir may not display even that last comment unless that comment was made on that specific CHANGE_ID.

Answered 02/12/2014 by: nimexx
Blue Belt

Please log in to comment
Answer this question or Comment on this question for clarity