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

Giuseppe Sollazzo gsollazz at sgul.ac.uk
Wed Feb 1 08:46:21 EST 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 01/02/12 13: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

Hi Gerard,
I begin to understand.

However, there is a problem with the {$Ticket->Subject} which I'm not
sure I know how to deal with

I get a subject line like:
*Helpdesk Job Logged: {RT::Ticket=HASH(0x1034ec88)->Subject} Output that*

which suggests the compiler is getting the object as a pointer rather
than its content.  Any idea?

Thanks,
Giuseppe

- -- 
____________________________________

Giuseppe Sollazzo
Senior Systems Analyst
Computing Services
Information Services
St. George's, University Of London
Cranmer Terrace
London SW17 0RE

Email: gsollazz at sgul.ac.uk
Direct Dial: +44 20 8725 5160
Fax: +44 20 8725 3583

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJPKUItAAoJEAqigArPBfJXlsMH/juz/RJQ6jq+UZoVGfsEk7G2
tpVIX1aUX8CSUq1YXd0I5VyULEqFAJechFJUi997b/LHp4CjtCPKHpNBpeE/TQW0
GsELSs623ie6HcVXY9LLkr5ZQNiugbYbIIBH067vJvf+JNg0B/cvkVI82nPbOAGI
FxRk2Z1ZNr5wmzxbayngAnpjY4pV1ulGz/2Hiwla3LAmf1UbSfCQPFi5Ystqq+BZ
/429yaA8UlFz5v94YaxqEUZukf7Q8Vc33rnVICRdEgg0aPec/CtHLxJNyBu/3fm/
RTyppExdD8wKvoQDKs9Iax7J6B+2FTLQpHp7QCv1goS51hd/o1Cij6D3wqgDT1E=
=PwsE
-----END PGP SIGNATURE-----

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20120201/0cee480b/attachment.htm>


More information about the rt-users mailing list