Rtconsole / REST issue

Hi,

I’d like to announce rtconsole (RT::Clien::Console on CPAN). It’s a
ncurses (text only) based interface for RT. It uses the REST API, and
POE.

Version 0.2.0 is just out, and I think it’s usable for real work. If
you are willing to try it, any feedback would be much appreciated.

description page : http://damien.krotkine.com/rtconsole/index.html

We have an issue with the REST API : afaik it’s not possible to get the
list of queues available on a RT server.

It makes it very inconvenient to raise a new ticket : usually entering
a valid queue name is mandatory (like on rt.cpan.org), but without a
list of possible ones, it’s difficult for the user to pick one properly.

Is there any way to get the list of available queues on the RT server ?

It is the same with custom fields, but that’s less of an issue for now.

Thanks,

dams

Hi!

I tested it on our installation. A first problem raised
up. If I try to open a merged ticket (“A” merged in "B"
I try to open “A”), the script crashed.

best regards and thank you for this promising tool.

sven

Constant subroutine RT::Client::Console::Session::ticket::OBJECT
redefined
at /usr/local/share/perl/5.8.8/RT/Client/Console/Session/Ticket.pm line
12
Constant subroutine RT::Client::Console::Session::ticket::Header::OBJECT
redefined at /usr/share/perl5/POE/Session.pm line 146.
Constant subroutine
RT::Client::Console::Session::ticket::CustFields::OBJECT redefined
at /usr/share/perl5/POE/Session.pm line 146.
Constant subroutine RT::Client::Console::Session::ticket::Links::OBJECT
redefined at /usr/share/perl5/POE/Session.pm line 146.
Constant subroutine RT::Client::Console::Session::OBJECT redefined
at /usr/local/share/perl/5.8.8/RT/Client/Console/Session.pm line 16
Constant subroutine RT::Client::Console::Session::Root::OBJECT redefined
at /usr/share/perl5/POE/Session.pm line 146.
Constant subroutine RT::Client::Console::Session::Status::OBJECT
redefined at /usr/share/perl5/POE/Session.pm line 146.
Constant subroutine RT::Client::Console::Session::KeyHandler::OBJECT
redefined at /usr/share/perl5/POE/Session.pm line 146.

We have an issue with the REST API : afaik it’s not possible to get the
list of queues available on a RT server.

Hm. Indeed this doesn’t seem to be possible via the REST API. I’d love
a patch to make it possible. (For any/all object types)

The right answer is definitely NOT to grab and parse the output of

/Elements/SelectQueue

Jesse Vincent a �crit :

We have an issue with the REST API : afaik it’s not possible to get the
list of queues available on a RT server.

Hm. Indeed this doesn’t seem to be possible via the REST API. I’d love
a patch to make it possible. (For any/all object types)

I’ll try to do that.

The right answer is definitely NOT to grab and parse the output of

/Elements/SelectQueue

Of course ! That was sooo not what I was willing to hack quickly. Who
would want to do such a nasty thing :slight_smile:

cheers,
dams

Jesse Vincent wrote:

We have an issue with the REST API : afaik it’s not possible to get the
list of queues available on a RT server.

Hm. Indeed this doesn’t seem to be possible via the REST API. I’d love
a patch to make it possible. (For any/all object types)

The right answer is definitely NOT to grab and parse the output of

/Elements/SelectQueue

rt show -t queues 1-100 |egrep Name|egrep -v " \$"|awk '{print $2}'

gives a list of the queue names on the system. change the 100 to
whatever is bigger than your biggest queue number.

Jeff Voskamp

We have an issue with the REST API : afaik it’s not possible to get the
list of queues available on a RT server.

Hm. Indeed this doesn’t seem to be possible via the REST API. I’d love
a patch to make it possible. (For any/all object types)

FWIW, I had written up some ruminations on revising the REST API
a year ago, but never had time to work on it. The idea was to
set up a framework in which new kinds of queries like this
could be dropped in in an easy and structured way. Wouldn’t surprise me
that developments in the past year have made this obsolete, but
if you’re interested:

 http://www.uic.edu/~bobg/rt_api.html

    bobg