[rt-users] Most efficient way to update custom fields without creating too many transactions

Landon Stewart lstewart at iweb.com
Tue Aug 27 12:36:53 EDT 2013


On 27 August 2013 09:27, Kevin Falcone <falcone at bestpractical.com> wrote:

> It'd be safer to use the RecordTransaction argument to
> AddCustomFieldValue which tells RT whether or not to record a
> transaction.
>
> This avoids the problem of directly manipulating OCFVs and potentially
> truncating them when you shove content > 255 into the Content field.
> RT transparently bounces between the Content and LargeContent field as
> needed if you use the API.
>

So, to be clear here, if in my RT::Action::ModuleName action module if I
use something like this:

$Ticket->AddCustomFieldValue( Field => 'Customer', Value =>
join("\n", at customerids), RecordTransaction => 0 );

And if @customerids contained a list of 1000 five or six digit numbers it
would not choke on that many because LargeContent would get used or because
I'm not recording the transaction at all?  Or am I mistaken here somewhere
still?

-- 
Landon Stewart :: lstewart at iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com :: +1 (888) 909-4932
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20130827/d1a85710/attachment.htm>


More information about the rt-users mailing list