Bug with clearing "Enter one value" custom field types?

Hi all,

I have created a CustomField of type “Enter one value” in a specific
queue. When I set a value for that field for a specific ticket, all is
well.

But when I try to clear the value (emptying the text widget in the web
page), the value returns unchanged.

I’ve peeked around in lib/RT/Interface/Web.pm, sub
ProcessTicketCustomFieldUpdates, and the code doesn’t seem to be able to
support this:

            my @values =
              ( ref( $ARGSRef->{$arg} ) eq 'ARRAY' )
              ? @{ $ARGSRef->{$arg} }
              : split /\n/, $ARGSRef->{$arg} ;
            if ( ( $arg =~ /-AddValue$/ ) || ( $arg =~ /-Value$/ ) )

{
foreach my $value (@values) {
next unless length($value);
my ( $val, $msg ) =
$Ticket->AddCustomFieldValue(
Field => $cf,
Value => $value
);
push ( @results, $msg );
}
}

If the value is “”, @values is an empty list and the whole thing is
skipped.

Any ideas?

Patrick

Report bug to rt3.fsck.com (guest/guest) or better patch.
Use “space” char as workaround.
Ruslan.
Patrick LeBoutillier wrote: