Chris Barnes wrote:
--> is there anyway for RT to indicate that there is "new information"
in the ticket that we need to look at?
Yes, there is. I have a Callback for
Elements/RT__Ticket/ColumnMap/ColumnMap which tags a 'New Reply' to a
ticket in my homepage elements. I got it from the wiki and think it is
related or belongs to the entry about colouring the status/priority.
I'll attach my ColumnMap just in case.
Regards,
Joop
<%INIT>
# Show status in colour.
sub statusInColor {
my $Ticket = shift;
my $status = $Ticket->Status;
my $css = "status" . lc $status;
my $cssreply = "status" . lc "reply";
my $LastUpdater = $Ticket->LastUpdatedByObj->EmailAddress;
my $TicketRequestors =
$Ticket->Requestors->MemberEmailAddressesAsString;
my $TicketCC = $Ticket->Cc->MemberEmailAddressesAsString;
my $CurrentUser = $session{'CurrentUser'}->EmailAddress;
# Added $CurentUser ne $LastUpdater to prevent showing New Reply tag when the
last updater is the current user.
if (($CurrentUser ne $LastUpdater) && ($TicketRequestors =~
$LastUpdater) || ($TicketCC =~ $LastUpdater))
{
my $txn = $Ticket->SeenUpTo or return \"$status";
# my $TicketLink = RT->Config->Get('WebPath')
."/Ticket/Display.html?id=". $Ticket->id. "#txn-".$txn->id;
# Comment out the line above and uncomment the following line to mark posts as
seen when following link.
my $TicketLink = RT->Config->Get('WebPath')
."/Ticket/Display.html?id=". $Ticket->id ."&MarkAsSeen=1". "#txn-".$txn->id;
$status = "$status New Reply";
}
else {
$status = "$status";
}
return \"$status";
}
# Show extended status in colour. This will change the front page and other
search pages where the ExtendedStatus is displayed.
sub extStatusInColor {
my $Ticket = shift;
if ( my $count = $Ticket->HasUnresolvedDependencies ) {
my $status;
if ( $Ticket->HasUnresolvedDependencies( Type => 'approval' )
or $Ticket->HasUnresolvedDependencies( Type =>
'code' ) ) {
$status = "" . loc('(pending approval)') . "";
} else {
$status = "" . loc('(pending
[quant,_1,other ticket])',$count) . "";
}
return \$status;
} else {
return statusInColor($Ticket);
}
}
# Set the priority numbers to a colour.
sub PriorityInColor {
my $Ticket = shift;
my $priority = $Ticket->Priority;
my $colors = undef;
# Change priority numbers to reflect your priority system.
if ($priority >= '50') {
$colors = "#FF";
} elsif ($priority >= '45') {
$colors = "#FF2000";
} elsif ($priority >= '40') {
$colors = "#FF4000";
} elsif ($priority >= '35') {
$colors = "#FF6A00";
} elsif ($priority >= '30') {
$colors = "#FF6600";
} elsif ($priority >= '25') {
$colors = "#FFA000";
} elsif ($priority >= '20') {
$colors = "#0033CC";
} elsif ($priority >= '15') {
$colors = "#809FFE";
} elsif ($priority >= '10') {
$colors = "#004600";
} elsif ($priority >= '5') {
$colors = "#006400";
} elsif ($priority >= '0') {
$colors = "#009000";
}
if ($colors) {
$priority = "$priority"
}
return \"$priority";
}
# Comment out any line to disable colour change.
$COLUMN_MAP->{Priority}->{value} = \&PriorityInColor;
$COLUMN_MAP->{Status}->{value} = \&statusInColor;
$COLUMN_MAP->{ExtendedStatus}->{value} = \&extStatusInColor;
<%ARGS>
$COLUMN_MAP => undef