[rt-users] Using custom conditions with custom fields

Tim Wilson twilson at buffalo.k12.mn.us
Fri Dec 22 14:31:09 EST 2006

Hi all,

I have what would seem to be a fairly typical situation here. I've got
a certain queue with two custom fields for each ticket contained there.
Let's call the custom fields "Foo" and "Bar." I would like to trigger a
scrip when the value of the "Foo" custom field is set to "Baz." I've got
the following custom condition for my scrip (adapted from the wiki):

if ( ($self->TransactionObj->Type eq "CustomField" ||
      $self->TransactionObj->Type eq "Create" ) &&
      ($self->TicketObj->FirstCustomFieldValue('Foo') =~ /Baz/i) ) {
    return 1;
return 0;

This doesn't quite work because it also gets triggered when the "Bar"
custom field is modified. I only want this to run when "Foo" is set to
"Baz" regardless of the value of "Bar" and whether  it was changed.

It would seem that I need a way to have the scrip ignore changes to
custom fields other than "Foo." Is this possible?


Tim Wilson, Director of Technology
Buffalo-Hanover-Montrose Schools
214 1st Ave NE   Buffalo, MN  55313
ph: 763.682.8740  fax: 763.682.8743  http://www.buffalo.k12.mn.us

More information about the rt-users mailing list