[rt-users] CustomFields in Scrip

Paul Tomblin ptomblin at xcski.com
Tue Apr 10 12:17:47 EDT 2012


On Tue, Apr 10, 2012 at 12:12 PM, Ruslan Zakirov <ruz at bestpractical.com>wrote:

> >> # Find the custom field "myCustom"
> >> my $myCustom =  $ticket->FirstCustomFieldValue("myCustom");
> >> $RT::Logger->debug("custom field = ". $myCustom);
> >>
> >> but it never gets the value.  Is there somewhere else I need to look for
> >> that custom field?  Is it in the TransactionObj instead?  Am I going to
> have
> >> to use TransactionBatch for this?
> >>
> > If anybody cares about this, yes, I had to use TransactionBatch.
>
> Status is set before custom field. Transaction batch delays scrip
> execution to the point where both changes are seen on the ticket.


What surprised me about this is that I didn't have to change the
RT::Condition or the RT::Action subclasses I used, I only had to enable
TransactionBatch in the config, and in initialdata (for this testing phase,
I clean the database and do another make initdb each time) add "Stage =>
'TransactionBatch'" to the @Scrips definition.


-- 
http://www.linkedin.com/in/paultomblin
http://careers.stackoverflow.com/ptomblin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20120410/98faa0eb/attachment.htm>


More information about the rt-users mailing list