[Rt-devel] Question about rt-extension-extractcustomfieldvalues design

Francis L Fabrizio fabrizio at uab.edu
Mon Oct 25 10:04:34 EDT 2010


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-devel/attachments/20101025/362ed99c/attachment.html>


More information about the rt-devel mailing list