[Rt-devel] rt command "-w" flag and non-numeric IDs
Philip Kime
pkime at Shopzilla.com
Tue Jun 27 16:51:48 EDT 2006
If you pass non-numeric IDs to the rt edit command (which isn't very
common with Tickets but is very common with Assets if you're using the
AT extension), you get warnings about the ID not being numeric in a
sort. For example:
# rt edit asset/server1 set CF-location="4th floor"
Argument "server1" isn't numeric in sort at /usr/local/rt/bin/rt line
1350.
The culprit is the "expand_list" subroutine in the rt command perl
script because this only expects numeric IDs. This probably needs fixing
since the REST interface allows for named objects as well as numerically
specified objects. As long as the machine supports NaN types, the
warning is harmless and it works anyway but I suspect that it would fail
otherwise so the expand_list sub should be fixed to sort numeric and
non-numeric object specifiers. I can submit a patch if this makes sense.
Just to clarify, it's not a problem with the AT REST interface, I've
come across a few assumptions like this in the RT REST code which had to
be generalised to get the AT REST code to work. This glitch is just
because it doesn't make much sense to refer to Tickets by "name" so the
(sensible) assumption of a numeric id for all objects passed to the rt
command is only found when you are using things like Assets which more
obviously can be referred to by name.
PK
--
Philip Kime
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.bestpractical.com/pipermail/rt-devel/attachments/20060627/3ca110bb/attachment.htm
More information about the Rt-devel
mailing list