[rt-users] colorize status

Richard Foley Richard.Foley at rfi.net
Wed Feb 25 11:07:02 EST 2009


Hi,

The code at http://wiki.bestpractical.com/view/ShowStatusInColor doesn't work for me.  Possibly because the directories are confusingly 
discussed.  I've got 3 files:

# /opt/rt3/local/html/Callbacks/MyCallbacks/Elements/RT__Ticket/Columnmap/Columnmap
<%INIT>

sub statusInColor {
   my $Ticket = shift;
   my $status = $Ticket->Status;
   my $css = "status" . lc $status;
   my $LastUpdater = $Ticket->LastUpdatedByObj->EmailAddress;
   my $TicketRequestors = $Ticket->Requestors->MemberEmailAddressesAsString;
   my $TicketCC = $Ticket->Cc->MemberEmailAddressesAsString;

   if (($TicketRequestors =~ $LastUpdater) || ($TicketCC =~ $LastUpdater))
   {
       $css = "status" . lc "reply";
       $status = "<div class=\"$css\">$status REP</div>";
   }
   else {
       $status = "<div class=\"$css\">$status</div>";
   }

   return \"$status";
}


$COLUMN_MAP->{Status}->{value} = \&statusInColor;

</%INIT>
<%ARGS>
$COLUMN_MAP => undef
</%ARGS>

# /opt/rt3/local/html/NoAuth/css/web2/End
@import "statuscolor.css";

# /opt/rt3/local/html/NoAuth/css/web2/statuscolor.css
/* Status Colours */

.statusnew {

color: #bb0000;
text-align: left;
font-weight: bold;

}

.statusopen {

color: #0000bb;
text-align: left;
font-weight: bold;

}

.statusreply {

color: #00bb00;
text-align: left;
font-weight: bold;

}

.statusresolved {

color: #888888;
text-align: left;
font-weight: bold;

}

.statusrejected {

color: #884444;
text-align: left;
font-weight: bold;

}

If I clean out my mason cache and restart my server, I still don't see the css status values being picked up.  Any hints as to where I might 
be going astray here, anyone?

-- 
Richard Foley
Ciao - shorter than aufwiedersehen

http://www.rfi.net/



More information about the rt-users mailing list