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

On 12/13/2007 10:15 AM, JB Segal wrote:
Quoth Stephen Turner ([EMAIL PROTECTED]):
At Thursday 12/13/2007 12:07 PM, JB Segal wrote:

So how does this mesh with the below-quoted Template Field
'CustomField-<id#>'? It _looks_ like that's just supposed to Do The
Right Thing, but it obviously doesn't.

Oh! Or is this a poor naming thing, and really the template field
should be named something more like CustomHeader or some such?

JB
I think there's some confusion with the term "template". The word is used for two completely different areas of RT functionality:

1. To describe predefined outgoing email message specifications (as in Config -> 
Global -> Templates)
2. To define data-upload format (Tools->Offline)

The code Gene posted relates to 1 whereas the CustomField-<id#> specifier 
relates to 2.

I don't think that your last sentence here is right...
The 2nd wiki page I mentioned,
http://wiki.bestpractical.com/view/Template
says in part:
What fields can at Template have?

A template can have a large number of fields. Look at the article
Template_Fields for more information.
What if I want to override a Global Template for one of my queues?

Templates are attached to Scrips by name - meaning that if you define a
Queue Template with the same name as a Global Template, when a Scrip is
triggered it will use the Queue Template instead.

One example would be to create a Queue Template called 'Correspondence'.
The various global Scrips that use the Correspondence template will use
our new template, not the global template of the same name. = = =
and the 3rd line of my quote links to my 1st linked page,
http://wiki.bestpractical.com/view/Template_Fields

Now, it's not impossible that the content of Template_Fields is
incorrect, as this IS a wiki and all that, but either the page needs
some SERIOUS correcting, or someoneone thinks that this is supposed to
be part of an email-generating system.

Either's fine by me, but I'd really love to know which. :)

JB


Steve
--
JB Segal                 617-886-5575            www.smartertravel.com
Systems/Network Admin.   465 Medford St. Ste 400 www.bookingbuddy.com
Smarter Travel Media LLC Boston, MA 02129        www.tripmania.com
_______________________________________________
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 [EMAIL PROTECTED] or call us at +1 617 812 0745.


Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com


_______________________________________________
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 [EMAIL PROTECTED] or call us at +1 617 812 0745.


Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com

Reply via email to