Hi,
I would like to colorize a CustomField column in the RT at a Glance
page, as described in the ShowStatusInColor wiki page. It works well for
status, but I don't get it for Customfield. What I wrote doesn't give
error, but doen't worh either. (I'm sorry I don't understand very much
CallBacks...). I'm In RT3.8
My CustomFiled is Named "Criticite" and has 3 possible values : Critique
/ Majeure / Mineure and it is not mandatory
Here is what I add in
/opt/rt3/local/html/Callbacks/MyCallbacks/Elements/RT__Ticket/ColumnMap/ColumnMap
:
sub criticiteInColor {
my $Ticket = shift;
# my $criticite = $Ticket->CustomFieldObj->Type;
my $criticite = $Ticket->CustomFieldObj->CustomFieldValues('3');
my $color = undef;
if ($criticite eq 'Critique') {
$color = "900000";
} elsif ($criticite eq 'Majeure') {
$color = "#AA8000";
} elsif ($criticite eq 'Mineure') {
$color = "#000090";
}
$criticite = loc($criticite);
if ( $Ticket->HasUnresolvedDependencies ) {
$criticite = "<i>$criticite<i>"
}
if ($color) {
$criticite = "<font color=$color>$criticite</font>"
}
return \"<u>$criticite</u>";
}
$COLUMN_MAP->{Criticite}->{value} = \&criticiteInColor;
help ?
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
Community help: http://wiki.bestpractical.com
Commercial support: [email protected]
Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com