[rt-users] CFs in Templates?

JB Segal jb at smarterliving.com
Thu Dec 13 17:43:05 EST 2007


Kenn,
This is fabulous! Thank you so much.
Would you mind me sticking this in to the wiki to fix the broken
information that's in there?

Everyone: Is there a matrix (simpler than grovelling through all the
perldoc that's out there) of all the objects you can pull out of a
ticket/stick in to a template/scrip/etc? Have I just not found it in the
wiki yet?

JB

Quoth Kenneth Crocker (KFCrocker at lbl.gov):
> JB,
> 
> 	Here is a copy of a "Template" I use. In this template, I am grabbing a Custom Field (named 
> 'Description') and printing it in the body of an email:
> 
> Subject: Request Titled: "{$Ticket->Subject}" has been Rejected!
> 
> ------------------------------------------------------------------
> TICKET INFORMATION:
> Ticket Queue  : {$Ticket->QueueObj->Name}
> Ticket Number : #{$Ticket->id}
> Ticket Subject: {$Ticket->Subject}
> Ticket Description:
>      {
>      return $Ticket->FirstCustomFieldValue('Description');
>      }
> Ticket Priority is: {$Ticket->Priority}
> Ticket  Created by: {$Ticket->CreatorObj->Name}
> Ticket Created  on: {substr($Ticket->Created, 0, 10)}
> -----------------------------------------------------------------
> 
> This "Template" could also serve as an example of how to just
> pull different "Ticket" information and put it into an email. Take
> particular notice of the blank line between the subject (a header)
> line and the body of the template (I like to put in a dashed line, for
> effect). RT has default header info and by using the name of the header
> line (i.e. "Subject:") I am essentially overriding  that default. However,
> RT needs for me to put a blank line between any header line overrides and
> the body so it can tell the difference. Otherwise, it won't work. Hope
> this helps.
> 
> 
> Kenn
> LBNL



More information about the rt-users mailing list