[rt-users] A hopefully quick question...

Greg Evans gevans at hcc.net
Tue Apr 1 20:03:23 EDT 2008

I implemented SHowStatusInCOlor from the wiki today
(http://wiki.bestpractical.com/view/ShowStatusInColor) and it is quite handy
for what we are doing here. Now I would also like to color the queue names
in a similar fashion. I used the first implementation shown on the Wiki page
(instead of the CSS version) and then thought, OK easy enough I can just
change this around a bit and do the same thing on the "Queue" column.

As everyone is well aware I consider myself a newb, and definitey NOT a perl
hacker or even close to resembling one, though I do have a copy of the Perl
books from O'Reilly, so maybe someday :)

Anyway, after my success with the status coloring, I did this and it doesn't
work :/ Can anyone tell me what I did wrong :)  I have a sneaky suspicion
that it involves the whole $Ticket->Queue bit, and I was admittedly just
guessing that $Ticket->Queue would be proper. 

sub queueInColor {
   my $Ticket = shift;
   my $queue = $Ticket->Queue;
   my $qcolor = undef;

   if ($queue eq 'queue1') {
       $qcolor = "#660099";
   } elsif ($queue eq ' queue2') {
       $qcolor = "#000090";
   } elsif ($queue eq ' queue3') {
       $qcolor = "#999999";
   } elsif ($queue eq ' queue4') {
       $qcolor = "#FF6600";
   } elsif ($queue eq ' queue5') {
       $qcolor = "#009000";
   } elsif ($queue eq ' queue6') {
       $qcolor = "#900000";
   } elsif ($queue eq ' queue7') {
       $qcolor = "#AA8000";
   } elsif ($queue eq ' queue8') {
       $qcolor = "#000000";
   } elsif ($queue eq ' queue9') {
       $qcolor = "#996633";

   $queue = loc($queue);

if ($qcolor) {
       $queue = "<font color=$qcolor>$queue</font>"

   return \"$queue";


Queue names have been changed to protect the innocent ;)
As always, any insight is appreciated.

Thanks in advance,

Greg Evans
Hood Canal Communications
(360) 898-2481 ext.212 

More information about the rt-users mailing list