[rt-users] Odd behavior, RT automatically reverts changes to Custom Fields

Matthew W. matt.k.wong at gmail.com
Thu Jun 14 09:48:24 EDT 2012


I'm relatively new to RT and have been running into this problem for a
few days now.  I've looked everywhere and haven't found a clue.  The
closest thing I could find was documented in this post:


But, I really don't want to to undo the changes that RT automatically

Basically, whenever I make changes to a custom field from a scrip
whatever the value that I add automatically gets reverted back to the
old value.  I tried adding code to delete the old value first, but RT
just adds the old value back.

Here's some psuedocode (code not tested and may contain typos, but my
code works just fine as I can see the transactions in the ticket

my $Value = 'some value';

my $CFName = 'customCF';
my $CF->LoadByName( Name => $CFName);

#Delete the old value:
     Field => $CFName,
     Value => $self->TicketObj->FirstCustomFieldValue($CFName)

#Set the new value:
$self->TicketObj->AddCustomFieldValue( Field => $CF, Value => $Value);

Bottom line: does anyone know how to prevent RT from undoing the
additions to a custom field?  This is in RT 4.0.4.


More information about the rt-users mailing list