[rt-users] Bug with clearing "Enter one value" custom field types?

Patrick LeBoutillier patl at fusemail.com
Fri Mar 12 12:46:17 EST 2004


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





More information about the rt-users mailing list