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

Hoogstraten, Ton Ton.Hoogstraten at ingram.nl
Wed Apr 2 04:04:06 EDT 2008


Try this:

My $queue = $Ticket->QueueObj->Name;



-----Original Message-----
From: rt-users-bounces at lists.bestpractical.com
[mailto:rt-users-bounces at lists.bestpractical.com] On Behalf Of Greg
Sent: Wednesday, April 02, 2008 2:03 AM
To: 'RT Users'
Subject: [rt-users] A hopefully quick question...

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 


Community help: http://wiki.bestpractical.com Commercial support:
sales at bestpractical.com

Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

More information about the rt-users mailing list