On Tue, Aug 27, 2013 at 09:36:53AM -0700, Landon Stewart wrote: > On 27 August 2013 09:27, Kevin Falcone <[1][email protected]> > 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",@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?
Because Custom Fields can hold a LONGBLOB worth of data. Go save a large text CF and look in the database. Saving them as 1000 individual values makes 1000 records in the database, saving them as 1 large record makes 1 record. These are treated differently on update and display. If you follow the advice of the wiki article that was linked to and reach around the API, you'll hurt yourself. Not recording transactions is orthogonal to the size of the data which can be recorded. -kevin
pgp3AI4ngPFzE.pgp
Description: PGP signature
