Odd scrip behavior: false positives are triggered, and modifications are made but not txn rescorded

Hi All,

I’m using RtBounceHandler - Request Tracker Wiki to detect bounces.
I then have the following scrip flag the bounced tickets, which has
been in place for months:

Custom condition: return 1 unless $self->Subject =~ /Bounce!/;
Custom action: 1;
Custom clean-up: my $curval =
$self->TicketObj->FirstCustomFieldValue(‘Tags’) || ‘’;
unless( $curval =~ /\bbounce\b/i ) {
my($st, $msg) = $self->TicketObj->AddCustomFieldValue(
Field => ‘Tags’,
Value => 'bounce, ’ . $curval,
RecordTransaction => 1 );
unless( $st ) {
$RT::Logger->warning( “Couldn’t prepend ‘bounce’ to CF ‘Tags’:”. $msg );
return undef;
}
}
return 1;

It seems to work when it ought, but today I just noticed that a number of
tickets have been tagged as bounce, even though they have no messages
with a subject of Bounce! This seems to occur when comments are added,
but not only on the first such transaction for a ticket. Any idea why,
and how to fix it it a non-kludgy way?

Thanks in advance!

Cambridge Energy Alliance: Save money. Save the planet.

P.S. I was wrong Re: “but not txn rescorded”, I forgot about
HideSystemTransactions

Cambridge Energy Alliance: Save money. Save the planet.