[rt-users] Set Subject in if/then clause

Kevin Falcone falcone at bestpractical.com
Wed Feb 1 14:19:28 EST 2012


On Wed, Feb 01, 2012 at 01:55:34PM +0000, Giuseppe Sollazzo wrote:
>    -----BEGIN PGP SIGNED MESSAGE-----
>    Hash: SHA1
> 
>    Hi Gerard,
>    many thanks - that worked.
> 
>    I really need to refresh my Perl...
> 
>    Cheers,
>    Giuseppe
> 
>    On 01/02/12 13:49, Gerard FENELON wrote:
>    > I suspect my proposal is
>          wrong Try instead
> 
>          >
> 
>          > Subject: { if ($Ticket->QueueObj->Name eq 'Work
>          Queue') { "Helpdesk
> 
>          > Job Logged: " . $Ticket->Subject . " Output this"; }
>          elsif
> 
>          > ($Ticket->QueueObj->Name eq 'Task Queue') { "Support
>          Job Logged: "
> 
>          > . $Ticket->Subject . " Output that"; } else { "Output
>          other"; } }
> 
>          >
> 
>          > Gerard
> 

Guiseppe - for reference, the syntax Gerard gave you came from the
fact that RT's templates are Text::Templates and you can read more
about them on CPAN:

http://search.cpan.org/dist/Text-Template/lib/Text/Template.pm

-kevin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20120201/4681e3ab/attachment.sig>


More information about the rt-users mailing list