[rt-users] colored ticket lists

Andreas Kruthoff andreas.kruthoff at softwired-inc.com
Fri Aug 16 02:24:05 EDT 2002


FYI: here is another way to colorize tickets. It works well with priorities 
going from 0 to 6 (prio 4,5,6 are light-, middle-, dark-red), but should work 
with other settings, too.

-andreas

46,58c46
<  if ($Ticket->Status eq "resolved") {
<      $bgcolor = "#ccffcc";
<  } elsif ($Ticket->Status eq "new") {
<      $bgcolor = "#ffffcc";
<  } elsif ($Ticket->Status eq "stalled") {
<      $bgcolor = "#ccccff";
<  } elsif ($Ticket->Priority >= $Ticket->FinalPriority * 0.9) {
<      $bgcolor = "#ff1111";
<  } elsif ($Ticket->Priority >= $Ticket->FinalPriority * 0.8) {
<      $bgcolor = "#ff7777";
<  } elsif ($Ticket->Priority >= $Ticket->FinalPriority * 0.6) {
<      $bgcolor = "#ffcccc";
<  } elsif ($i % 2) {
---
>  if ($i % 2) {


On Wednesday 14 August 2002 16:52, Stefan Scherer wrote:
> > I'd be interested in them. Can you send it to me?
>
> The Search/Listings.html diff looks like this. Here I
> also painted resolved tickets in a green color.
>
> 41a42,51
>
> > my @todo_colors = ( "#dadada", "#dad0d0",
> >  "#dacaca", "#dac0c0",
> >  "#dababa", "#dab0b0",
> >  "#daaaaa", "#da9090",
> >  "#da8a8a", "#da7070" );
> > my @done_colors = ( "#dadada", "#d0dad0",
> >  "#cadaca", "#c0dac0",
> >  "#badaba", "#b0dab0",
> >  "#aadaaa", "#90da90",
> >  "#8ada8a", "#70da70" );
>
> 49a60,66
>
> >  }
> >  my $status = eval("\$Ticket->Status");
> >  my $prio = eval("\$Ticket->Priority");
> >  if ($status eq "new" || $status eq "open") {
> >     $bgcolor = $todo_colors[$prio];
> >  } else {
> >     $bgcolor = $done_colors[$prio];
>
> _______________________________________________
> rt-users mailing list
> rt-users at lists.fsck.com
> http://lists.fsck.com/mailman/listinfo/rt-users
>
> Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm





More information about the rt-users mailing list