[rt-users] Conditions in a template?
testwreq wreq
testwreq at gmail.com
Thu Sep 3 13:29:26 EDT 2009
Dear RT Gurus,
We have created cusomized "Auto Reply" templates for all the queues, that
overwrites the "Global Auto Reply" template. I am wondering if anyone know
of any documentation on customizing template with conditions?
Basically, the first few lines of my customized template is assigning a
owner 'A' to the queue, and it does not record the transaction.
This is fine when the request is generated via email. However, we are coming
accross a situation where users are generating request using the 'Ticket
Create Option' of the interface and want to assign the ticket to another
staff member.. i.e. oweber 'B'. The users are able to select owner "B" from
the interface, but because of our customized template, the owner is written
back as "A".
Is there a condition that I can use to check the previous value of "owner"
prior to assigning owner "B"?
For Eaxmple, check if Field=>'owner' has a value,
if yes, keep the same value and set RecordTransaction=>0, ELSE
give the value as 'B' and set RecordTransaction=>0
Any suggestions/hlp will be appreciated. Regards rq.
============= END ===========
{
### assigns owner but doesn't record transaction ### Note that $owner needs
to be the RT id for the owner object, ### not a name or e-mail address.
my $owner = '22';
$Ticket->_Set(Field=>'Owner', Value=>$owner, RecordTransaction=>0); $OUT .=
""; }
Subject: AutoReply: {$Ticket->Subject}
This message has been automatically generated in response to the creation of
a trouble ticket regarding:
{
if ($Ticket->Subject() eq '') {
$OUT .= " No Subject";
}
}
{ $Ticket->Subject() }
A summary of which ...
===================
{$Transaction->Content()}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20090903/f2588abc/attachment.htm>
More information about the rt-users
mailing list