[rt-users] highlight updated tickets

Johan Baarman johan.baarman at citec.fi
Tue Feb 5 04:16:10 EST 2008


Hi, sorry for the late reply but I was looking for almost the same thing and
here¹s how I solved it. I wanted to check if a ticket had been updated by
anyone else than our staff i.e. requestor or any of the CC:s. I used the
example callback and the css from the wiki to change the statuscolor and
this is the function:

sub statusInColor {
   my $Ticket = shift;
   my $status = $Ticket->Status;
   my $css = "status" . lc $status;
   my $LastUpdater = $Ticket->LastUpdatedByObj->EmailAddress;
   my $TicketRequestors = $Ticket->Requestors->MemberEmailAddressesAsString;
   my $TicketCC = $Ticket->Cc->MemberEmailAddressesAsString;
 
   if (($TicketRequestors =~ $LastUpdater) || ($TicketCC =~ $LastUpdater))
   {
       $css = "status" . lc "reply";
    $status = "<div class=\"$css\">$status REP</div>";

   }
   else { 
       $status = "<div class=\"$css\">$status</div>";
   }

   return \"$status";
}

Besides changing the color, I set a ³REP² flag after the status in case any
of the users are colorblind. Hope this helps.

Regards,
Johan Baarman



On 1/23/08 2:49 PM, "Hoogstraten, Ton" <Ton.Hoogstraten at ingram.nl> wrote:

> Ello,
>  
> I'm looking for a possible way to make a ticket highlight when it has been
> last updated by anybody else then the owner. I Found ShowStatusInColor on the
> Wiki page, and it comes close to what I want but I could use some help finding
> the correct last updated by user in a ticket instead of the ticket status so I
> can modify the callback.
>  
> Regards,
>  
> Ton Hoogstraten
> 
> 
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
> 
> Community help: http://wiki.bestpractical.com
> Commercial support: sales at bestpractical.com
> 
> 
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
> Buy a copy at http://rtbook.bestpractical.com


###########################################

This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange.
For more information, connect to http://www.f-secure.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20080205/70cc01d0/attachment.htm>


More information about the rt-users mailing list