[rt-users] Circular scrip calls...

Dirk Pape pape-rt at inf.fu-berlin.de
Sat Feb 28 07:41:02 EST 2004


Hello Cerion,

Thanks for the report.

--Am Freitag, 27. Februar 2004 15:01 Uhr +0100 schrieb Cerion Armour-Brown 
<cerion at terpsichore.ws>:

> A 'quick fix' for this particular one is:
> ExtractCustomFieldValues.pm :
>   sub Commit {
> +   unless ( $Transaction->Attachments->First ) { return 1; }

patched and built a new version: 
<http://page.mi.fu-berlin.de/~pape/rt3/ExtractCustomFieldValues-1.0b2.tgz>.

I never had this error, though, because I trigger my 
ExtractCustomFiledValues action only from "Create"-transcations, that 
always have (so far I know) an attachment.

> But this should be made more general, yes?
> I found the 'ActivateScrips' functionality in Transaction_overlay.pm
> I could do something like:
>
> $Ticket->AddCustomFieldValue (Field => $cf, Value => $_,
> Activate_Scrips=0); and pass it through all the way to
> Transaction_Overlay.pm sub Create...

no, it is not a good way to decide in a scrip if other scrips should be 
called afterwards.

We might have patched ECFV's Prepare function to signal that the action is 
not applicable, if there is no attachment on the transaction but your patch 
is (maybe less performant) but more robust.

Dirk.



More information about the rt-users mailing list