
fabrizio at uab
Oct 25, 2010, 7:04 AM
Post #1 of 1
(445 views)
Permalink
|
|
Re: 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 [mailto:rt-devel-bounces [at] lists] 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
|