Re: [rt-users] Dynamic choice of templates based on the value of a CF

2013-09-09 Thread Gene LeDuc
In the past I ended up turning the templates into perl programs.  I made 
all the decisions within the template and then built the output based on 
that logic.  It wasn't very pretty (it was ugly, actually), but it 
worked flawlessly for years.  Gotta be careful with maintenance on the 
templates, though, because a seemingly unrelated change in one part of 
the template sometimes was more related to other parts of the template 
than we thought.


Gene

On 9/6/2013 1:33 PM, Landon Stewart wrote:

On 6 September 2013 11:55, Landon Stewart lstew...@iweb.com
mailto:lstew...@iweb.com wrote:

Actually I believe I found the answer which I'm going to try…  I
basically need a hybrid of these two because we also send different
copies of templates depending on the language the customer prefers
to be communicated with in.

http://requesttracker.wikia.com/wiki/ForkTemplate
http://requesttracker.wikia.com/wiki/ChooseTemplateByUserLang

So - never mind my original post unless you have any information
that's better than the two ones above.


Well after trying and trying - none of this has worked because
SetTemplate() is no longer a valid method for Conditions in RT 4.0.17
among other reasons.

If anyone has any information on how to dynamically set the Template in
a Scrip with RT 4.0.x I would greatly appreciate it!

--
Landon Stewart :: lstew...@iweb.com mailto:lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com :: +1 (888) 909-4932




Re: [rt-users] Dynamic choice of templates based on the value of a CF

2013-09-06 Thread Landon Stewart
On 6 September 2013 11:04, Landon Stewart lstew...@iweb.com wrote:

 What I think I can do is simply have one very short Template that is
 basically 100% perl and includes some text from a text file stored on the
 file system but outside RTIR.  Which file gets included in the Template is
 dependent upon the CF.{Classification}.

 ie:
 { require
 /path/to/templates/.$Ticket-FirstCustomFieldValue('Classification')..template;
  }


Actually I believe I found the answer which I'm going to try…  I basically
need a hybrid of these two because we also send different copies of
templates depending on the language the customer prefers to be communicated
with in.

http://requesttracker.wikia.com/wiki/ForkTemplate
http://requesttracker.wikia.com/wiki/ChooseTemplateByUserLang

So - never mind my original post unless you have any information that's
better than the two ones above.

-- 
Landon Stewart :: lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com :: +1 (888) 909-4932


Re: [rt-users] Dynamic choice of templates based on the value of a CF

2013-09-06 Thread Landon Stewart
On 6 September 2013 11:55, Landon Stewart lstew...@iweb.com wrote:

 Actually I believe I found the answer which I'm going to try…  I basically
 need a hybrid of these two because we also send different copies of
 templates depending on the language the customer prefers to be communicated
 with in.

 http://requesttracker.wikia.com/wiki/ForkTemplate
 http://requesttracker.wikia.com/wiki/ChooseTemplateByUserLang

 So - never mind my original post unless you have any information that's
 better than the two ones above.


Well after trying and trying - none of this has worked because
SetTemplate() is no longer a valid method for Conditions in RT 4.0.17 among
other reasons.

If anyone has any information on how to dynamically set the Template in a
Scrip with RT 4.0.x I would greatly appreciate it!

-- 
Landon Stewart :: lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com :: +1 (888) 909-4932