The documented syntax is:
rt edit <object> add field=value [...]
del field=value [...]
But the code actually expected “add field value”.
This patch fixes the code.
– ams
— bin/rt.pl~ Thu Oct 16 02:38:17 2003
+++ bin/rt.pl Thu Oct 16 02:40:10 2003
@@ -293,11 +293,11 @@
my $vars = 0;
my $hash = ($_ eq “add”) ? %add : %del;
-
while (@ARGV && $ARGV[0] =~ /^$field$/ && $ARGV[1]) {
-
my $key = shift @ARGV;
-
my $val = shift @ARGV;
-
while (@ARGV && $ARGV[0] =~ /^($field)=(.*)$/) {
-
my ($key, $val) = ($1, $2); vpush($hash, lc $key, $val);
-
shift @ARGV; $vars++; } unless ($vars) {