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

Rolf Krogstad rgk at pacelabs.com
Tue Feb 12 14:34:24 EST 2013


Ruslan Zakirov <ruz <at> bestpractical.com> writes:

> 
> Hi,
> 
> It's known issue with scrips that set custom fields based on other
> fields. You workaround it either by not allowing people to change
> custom fields you auto set with scrips or by running your scrip in
> batch stage.
> 
> Some details. RT processes updates to custom fields one by one from
> request args, your scrip kicks in in the middle and then RT thinks,
> when it gets to a field that was changed by a scrip, that user picked
> different value and changes it back.
> 
> On Thu, Jun 14, 2012 at 5:48 PM, Matthew W. <matt.k.wong <at> gmail.com> 
wrote:
> > Hello,
> >
> > 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:
> >
> > http://www.mail-archive.com/rt-users <at> 
lists.bestpractical.com/msg10037.html
> >
> > But, I really don't want to to undo the changes that RT automatically
> > undoes....
> >
> > 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
> > history):
> >
> > my $Value = 'some value';
> >
> > my $CFName = 'customCF';
> > my $CF->LoadByName( Name => $CFName);
> >
> > #Delete the old value:
> > $self->TicketObj>DeleteCustomFieldValue(
> >     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.
> >
> > --Matthew.
> 

I just upgraded from version 3.6.6 to 4.0.10.
I followed the UPGRADE-X.X.X process.
My problem seems to be what is described above, but I don't know how to fix it.
The NEW TICKET function worked in 3.6.6 but not in 4.0.10

When I log in I have the option of click a button to create a new ticket.
Next to that button is a dropdown list to indicate the Queue.  We have custom 
fields defined based on the Queue selected.
No matter what Queue I select it reverts to the first in the list even before 
I click the NEW TICKET button.

If I use the Quick Create, I have all my custom fields available and can 
update them there.

Any Ideas?

Rolf 






More information about the rt-users mailing list