We created the ticket notification email so whenever a ticket is created all the IT staff gets an email.  We also added a custom field to the tickets that is hidden from the users called "Affected User".  This way when we get a call or email and create a ticket we can specify who the user is that need assistance.  We would also like to include this field on the notify email.  It is listed as CUSTOM_2 under the ticket layout but when I include "Affected User: $custom_2" in the email body of the notify rule it doesn't populate on the email, it shows exactly that "Affected User: $custom_2".  Any ideas?  Thanks!

0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answers

2

The SQL code will use a number lower than in the GUI, so CUSTOM2 in the GUI would be HD_TICKET.CUSTOM_FIELD_VALUE1 in the SQL code.  You'll need to include HD_TICKET.CUSTOM_FIELD_VALUE1 in the SQL Select statement's SELECT section, something like this:

SELECT .... (all of your other SELECT items)... HD_TICKET.CUSTOM_FIELD VALUE1 as AFFECTED_USER .... (other SELECT items) FROM etc

Just be aware that HD_TICKET might be getting aliased as T (look for something like HD_TICKET T), in which case you would use T.CUSTOM_FIELD_VALUE1.

From there, use $AFFECTED_USER in the email, and the email should return the value.

For some examples of this, check out the Email Alert ticket rules in these posts:

http://www.itninja.com/blog/view/k1000-service-desk-time-tracking-queue-config-custom-ticket-rules-sql-reports

http://www.itninja.com/blog/view/k1000-service-desk-equipment-request-queue-config-custom-ticket-rules

Hope that helps!

John

 

Answered 07/25/2012 by: jverbosk
Red Belt

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