[rt-users] color of tickets based on priority

Simon Cozens rt at simon-cozens.org
Fri Mar 1 05:41:40 EST 2002


Rob Walker:
> Does anyone out there have patches to color tickets based on priority? 
> I know that the flexibility of RT hurts us here, as with keystone (where
> I am getting the idea from) the priorities are set for you, with 10 low
> and 1 high.  Here is a screenshot of what I am talking about.

Here we use priorities from 1 to 100, with 90-100 as "urgent" and 
95-100 as "critical". The patch is relatively self-explanatory,
and it should be easy enough to work out how to change the scale and
add more colours.

==== //systems/src/rt/webrt/Search/Listing.html#4 (xtext) ====
Index: src/rt/webrt/Search/Listing.html
--- src/rt/webrt/Search/Listing.html.~1~        Fri Mar  1 10:33:44 2002
+++ src/rt/webrt/Search/Listing.html    Fri Mar  1 10:33:44 2002
@@ -54,7 +54,13 @@
 $session{'tickets'}->RedoSearch();
  while (my $Ticket = $session{'tickets'}->Next) {
    $i++;
    - if ($i % 2) {
    + if ($Ticket->Priority >= 96) {
    +    $bgcolor = "#ff2222";
    + }
    + elsif ($Ticket->Priority >= 90) {
    +    $bgcolor = "#ff7777";
    + }
    + elsif ($i % 2) {
          $bgcolor = "#dddddd";
            }
              else {
              End of Patch

-- 
Skud's Law: The surreality of the universe tends toward a maximum.




More information about the rt-users mailing list