[Rt-devel] Question about rt-extension-extractcustomfieldvalues design
Francis L Fabrizio
fabrizio at uab.edu
Mon Oct 25 10:46:58 EDT 2010
Sorry Todd, I missed the context and read "I would think it fairly common to want to use { $Ticket->FirstCustomFieldValue('foo') } in email templates" as a blanket statement that it doesn't work. My bad. :-)
-Fran
> -----Original Message-----
> From: rt-devel-bounces at lists.bestpractical.com [mailto:rt-devel-
> bounces at lists.bestpractical.com] On Behalf Of Francis L Fabrizio
> Sent: Monday, October 25, 2010 9:05 AM
> To: 'Todd Chapman'; RT developers
> Subject: Re: [Rt-devel] Question about rt-extension-
> extractcustomfieldvalues design
>
> Unless I misunderstand what you are asking, I think this actually does
> work. Here’s part of a template I did yesterday:
>
>
>
> -----------------
>
> This unowned ticket has just been assigned to the {
>
> if ($Transaction->Type eq "Create") {
>
> $OUT .= $Ticket->FirstCustomFieldValue("RequestingUnit");
>
> } else {
>
> $OUT .= $Transaction->NewValue();
>
> }
>
> } Area of Responsibility. Please review this ticket and take or assign
> ownership as appropriate.
>
> -------------------
>
>
>
> The RequestingUnit value gets populated appropriately when doing a
> Create transaction, which means that the call to
> FirstCustomFieldValue() worked.
>
>
>
> Is that not what you are trying to do?
>
>
>
> -Fran
>
>
>
> PS – The purpose of my template is to notify certain people when
> RequestingUnit is first populated or is changed, hence the branching
> logic. I think I had to call NewValue() in the case of a CustomField
> transaction because FirstCustomFieldValue was giving me the old value
> instead of the new one… I can’t quite recall, but in any case, calling
> FirstCustomFieldValue() from a template appears to be working fine.
>
>
>
>
>
> From: rt-devel-bounces at lists.bestpractical.com [mailto:rt-devel-
> bounces at lists.bestpractical.com] On Behalf Of Todd Chapman
> Sent: Sunday, October 24, 2010 10:57 AM
> To: RT developers
> Subject: [Rt-devel] Question about rt-extension-
> extractcustomfieldvalues design
>
>
>
> Is there some reason extractcustomfieldvalues does it's work in Commit
> instead of Prepare? I would think it fairly common to want to use {
> $Ticket->FirstCustomFieldValue('foo') } in email templates, but since
> extractcustomfieldvalues does it's work in Commit and the templates are
> evaulated in Prepare, even scrip ordering doesn't make this possible.
>
>
>
> Thanks.
>
>
>
> -Todd
More information about the rt-devel
mailing list