Patch: Small bug in CLI (rt ls -l not working)

Hi,

I’ve discovered a small bug in the CLI
If you do a

rt ls -l id=12345

then the error message is

could not find component for path ‘/rt/REST/1.0/Forms/ticket/default’

This happens if you do not specify the server to be http://localhost/ but
e.g. http://localhost/rt

The following patch fixes that:

*** html/REST/1.0/search/ticket.orig Fri Jan 2 23:55:55 2004
— html/REST/1.0/search/ticket Wed Aug 25 08:53:17 2004
*** 101,107 ****
}
else {
my $id = $ticket->Id;
! my $d = $m->comp(“$RT::WebPath/REST/1.0/Forms/ticket/default”, id => $id, format => $format, fields => %fields);
my ($c, $o, $k, $e) = @$d;
push @output, [ $c, $o, $k ];
}
— 101,107 ----
}
else {
my $id = $ticket->Id;
! my $d = $m->comp(“/REST/1.0/Forms/ticket/default”, id => $id, format => $format, fields => %fields);
my ($c, $o, $k, $e) = @$d;
push @output, [ $c, $o, $k ];
}

Wolfgang Friebel
Deutsches Elektronen-Synchrotron DESY | Phone: +49 33762 77372 |
Platanenallee 6 | Fax: +49 33762 77216 |
D-15738 Zeuthen Germany | E-Mail: Wolfgang.Friebel@desy.de |