Colored ticket lists

I have modified some code to have colored ticket lists
just like in sourceforge.net.

High priority tickets will be more red than low priority
tickets.

If someone is interested in the changes, I can contribute
them here. Or is there a way to put them onto the ftp
server?

Bye,

Stefan

Stefan Scherer
SEAL Systems Tel. : +49 (0) 9195-926-128
Lohmuehlweg 4 Fax : +49 (0) 9195-1739
D-91341 Roettenbach MailTo:stefan.scherer@sealsystems.de
Germany WWW : http://www.sealsystems.de

I have modified some code to have colored ticket lists
just like in sourceforge.net.

I tweaked it to show colors based on status (open = green, red =
stalled).

How’d you do it? I just updated the Search/Listing.html template in my
local RT directory.

xoa

‘Andy Lester andy@petdance.com
Programmer/author petdance.com
Daddy parsley.org/quinn Jk’=~/.+/s;print((split//,$&)
[unpack’C*‘,"n2]3%+>"34.’%&.‘^%4+!o.’"])

I have modified some code to have colored ticket lists
just like in sourceforge.net.

I tweaked it to show colors based on status (open = green, red =
stalled).

How’d you do it? I just updated the Search/Listing.html template in my
local RT directory.

Yes, I also modified Search/Listing.html. Additionally I also changed
Elements/MyRequests and Elements/MyTickets.
So we also can see high priority tickets in the home page of each member.

It’s about the same code in all the files.

Here is a diff of Elements/MyTickets (I’m using RT version 2.0.12)
9a10,15

% my $bgcolor;
% my @todo_colors = ( “#dadada”, “#dad0d0”,
% “#dacaca”, “#dac0c0”,
% “#dababa”, “#dab0b0”,
% “#daaaaa”, “#da9090”,
% “#da8a8a”, “#da7070” );
11c17,20
<

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

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) {