On Tue, Feb 19, 2013 at 12:37:42PM +0800, Craig Ringer wrote:
>    {
>      my $d = RT::Date->new(RT::SystemUser);
>      $d->Set(Format=>'ISO', Value=>$Ticket->Due, Timezone=>"GMT");
>      our $tdiff = $d->AgeAsString();

You can just say $ticket->DueObj->AgeAsString if you want to tighten
this up.

When you want to replicate something RT does in core in the search
results, you can take a quick look at share/html/Elements/*/ColumnMap
(so look in RT__Ticket/ColumnMap for the DueRelative sub)

-kevin

Attachment: pgp_bfTSv7eq0.pgp
Description: PGP signature


-- 
RT training in Amsterdam, March 20-21: 
http://bestpractical.com/services/training.html

Help improve RT by taking our user survey: 
https://www.surveymonkey.com/s/N23JW9T

Reply via email to