rt.cpan.org, sort by severity

schwern on 2007-11-24T23:42:17

It's always annoyed me that rt.cpan.org can no longer sort tickets by severity. This isn't such a big deal unless you have a lot of tickets, as I do. MakeMaker alone has over 90.

I found RT::Client::REST and hacked up their example to produce for me a list by severity. Yay! If one cared, you could encode the search results as JSON and make some sort of clever web interface with resortable columns.

#!/usr/bin/perl -w

use strict;

use Error qw(:try);

use RT::Client::REST;

my %Config = ( server => 'http://rt.cpan.org', username => 'YOU', password => 'wouldn't you like to know', queue => 'Your-Module' );

my $rt = RT::Client::REST->new( server => $Config{server}, timeout => 30 );

try { $rt->login( username => $Config{username}, password => $Config{password} ); } catch Exception::Class::Base with { die "problem logging in: ", shift->message; };

my @ids; try { @ids = $rt->search( type => 'ticket', query => qq[ (Status = 'new' or Status = 'open') and Queue = '$Config{queue}' ], orderby => 'CustomField.{Severity}' ); } catch Exception::Class::Base with { die "search failed", shift->message; };

for my $id (@ids) { my $ticket = $rt->show(type => 'ticket', id => $id); print "ID: $id\n"; print "\tSubject: ", $ticket->{Subject}, "\n"; print "\tSeverity: ", $ticket->{"CF-Severity"}, "\n"; }


or even in flash

link on 2007-11-25T22:11:36

Something like this but able to load more than 3 tickets a second

http://www.redbrick.dcu.ie/user/link/RT/RT.html

Sounds like a job for GreaseMonkey...

Yanick on 2007-11-26T17:51:50

I'm toying around with GreaseMonkey these days, and that seems to be a perfect jobs for its hairy paws: RtSeverityOrdering.

An alternative way to search rt.cpan.org.

dmitri on 2007-12-28T21:54:07

Here is an alternative to rt.cpan.org's default searching mechanism.