It took a long time for me to get a ticket rule working correctly that would email techs when a ticket is in a specific status and the associate replies.  The rule changes the status and sends an email to the ticket owner.  After upgrading from 6.2 to 6.3 this no longer works and the email comes in showing the $comment command instead of the ACTUAL comment the person added.  I have tried both that and $last_comment but nether seem to work anymore.  Any assistance would be appreciated!!  Here is what the email to owner is written as currently.  All other variables work as expected:

A response from  has been received for ticket $ticknum.
From: $updatername
Title: $title
Status: $status_name

Comment: $comment
You may review the ticket here: http://kace/adminui/ticket?ID=$ticknum

The status was "$status_name" and is now marked as "Response Received".
Answer Summary:
Cancel
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answer Chosen by the Author

1
The variables available in the message depend on the SQL select statement of the rule. Can you post your select statement so we can see how you are selecting the comment field from the HD_TICKET_CHANGE table?

Answered 08/31/2015 by: chucksteel
Red Belt

  • Grrr.... something must have been altered during the upgrade to 6.3 because I remember manually adding the comment variable and now it is not there!! LOL Here is my SQL:

    select distinct HD_TICKET.ID,
    HD_TICKET.OWNER_ID as OWNER_ID,
    HD_TICKET.ID as TICKNUM,
    HD_TICKET.TITLE,
    HD_STATUS.NAME AS STATUS_NAME,
    HD_STATUS.STATE as STATE,
    OWNER.USER_NAME as OWNER_NAME,
    OWNER.FULL_NAME as OWNER_FULLNAME,
    OWNER.EMAIL as OWNER_EMAIL,
    UPDATER.USER_NAME as UPDATERNAME,
    UPDATER.EMAIL as UPDATEREMAIL
    from (HD_TICKET, HD_STATUS)
    left join HD_TICKET_CHANGE on HD_TICKET_CHANGE.ID = <CHANGE_ID>
    left join HD_TICKET_CHANGE_FIELD on HD_TICKET_CHANGE_FIELD.HD_TICKET_CHANGE_ID = HD_TICKET_CHANGE.ID
    left join USER OWNER on OWNER.ID = HD_TICKET.OWNER_ID
    left join USER UPDATER on UPDATER.ID = HD_TICKET_CHANGE.USER_ID
    where HD_STATUS.ID = HD_TICKET.HD_STATUS_ID
    and HD_TICKET_CHANGE.HD_TICKET_ID= HD_TICKET.ID
    and HD_TICKET_CHANGE_FIELD.FIELD_CHANGED !='SATISFACTION_RATING'
    and HD_TICKET_CHANGE_FIELD.FIELD_CHANGED !='SATISFACTION_COMMENT'
    and HD_STATUS.ID in (56,59)
    and (UPDATER.ID <> OWNER.ID or OWNER.ID is NULL)
    and UPDATER.ID > 0
    • Yep, you need to add HD_TICKET_CHANGE.COMMENT to your list of selected fields.
Please log in to comment

Answers

Answer this question or Comment on this question for clarity