[rt-users] CFs in Templates?
Kenneth Crocker
KFCrocker at lbl.gov
Thu Dec 13 18:17:59 EST 2007
JB,
Actually, all I did in that Template is use information that is already
in one example or another on the wiki. Gene LeDuc was a HUGE help in
understanding how some of this works in scrips and templates. I can only
assume a lot of his understanding came from stuff already in the wiki as
well. My biggest learning curve was in understanding how to find stuff
in the wiki and learning the many variations of PERL code that can
accomplish the same thing. I'm not sure that the info on THIS type of
template in the wiki IS broken. Anyway, I'm glad I was of help.
Kenn
LBNL
On 12/13/2007 2:43 PM, JB Segal wrote:
> 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
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> SAVE THOUSANDS OF DOLLARS ON RT SUPPORT:
>
> If you sign up for a new RT support contract before December 31, we'll take
> up to 20 percent off the price. This sale won't last long, so get in touch today.
> Email us at sales at bestpractical.com or call us at +1 617 812 0745.
>
>
> Community help: http://wiki.bestpractical.com
> Commercial support: sales at bestpractical.com
>
>
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
> Buy a copy at http://rtbook.bestpractical.com
>
More information about the rt-users
mailing list