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

Kevin Falcone falcone at bestpractical.com
Tue Aug 27 12:27:11 EDT 2013

On Tue, Aug 27, 2013 at 09:51:57AM +0100, G. Dawson wrote:
> On 2013-08-26 21:55, Landon Stewart wrote:
> >
> >For example if there are 1000 IP addresses in a ticket and there are 4
> >custom fields to be updated it creates 4000 transactions for that one
> >ticket when looping each update individually.
> >
> >What I'm wondering is if there's a better way to make these updates so
> >multiple values can be added to the ticket with one transaction.
> >
> Not quite want you want but can you silence the transactions by
> using the long form of the Set method described in the "How to be
> Silent"
> section of
> http://requesttracker.wikia.com/wiki/WriteCustomAction

It'd be safer to use the RecordTransaction argument to
AddCustomFieldValue which tells RT whether or not to record a

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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 235 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20130827/e94043dd/attachment.sig>

More information about the rt-users mailing list