[rt-users] Set Subject in if/then clause
Gerard FENELON
gerard at eve-team.com
Wed Feb 1 08:49:22 EST 2012
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
On 2012-02-01 14:30, Gerard FENELON wrote:
> Try something like
>
> 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"; }
> }
>
> In other words, your perl script should return a string.
>
> Gerard
>
> On 2012-02-01 14:18, Giuseppe Sollazzo wrote:
>> On 01/02/12 13:08, Gerard FENELON wrote:
>>> Hi Giuseppe
>>>
>>> what is your definition of "This doesn't seem to work" ? what is
>>> the (bad) behaviour that you are seeing ? Does an email get sent or
>>> not ? What is its subject line and content ? Anything in the logs
>>> ?
>>>
>>> Gerard
>> Hi Gerard,
>>
>> I should have been clearer but I thought it was evident: the "Subject"
>> line is not valid Perl, so you can't compile a script built that way.
>>
>> The question is if there's a standard way to add that directive (a
>> non-Perl one) within the if-clause.
>>
>> Thanks,
>> Giuseppe
>>
>>> On 2012-02-01 12:03, Giuseppe Sollazzo wrote:
>>>> Hi, I'm trying to set up a different subject for different queues
>>>> in the same template (autoreply). This doesn't seem to work:
>>>>
>>>> { if ($Ticket->QueueObj->Name eq 'Work Queue') { Subject:
>>>> Helpdesk Job Logged: {$Ticket->Subject} "Output this"; } elsif
>>>> ($Ticket->QueueObj->Name eq 'Task Queue') { Subject: Support Job
>>>> Logged: {$Ticket->Subject} "Output that"; } else { "Output
>>>> other"; } }
>>>>
>>>> Is there a way to get this work?
>>>>
>>>> Thanks, Giuseppe
> --------
> RT Training Sessions (http://bestpractical.com/services/training.html)
> * Boston March 5 & 6, 2012
>
--
Gerard FENELON Corporate Support
Emulation& Verification Engineering
2 bis, voie La Cardon
phone: +33 1 6453 2734 Parc Gutenberg
fax: +33 1 6453 2740 91120 Palaiseau
http://www.eve-team.com FRANCE
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20120201/6eaa9e22/attachment.htm>
More information about the rt-users
mailing list