[rt-users] Getting relative time in a template, configuring SLA and SLA alerting [SOLVED]
Craig Ringer
craig at 2ndquadrant.com
Tue Feb 19 17:39:32 EST 2013
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 02/19/2013 10:48 PM, Kevin Falcone wrote:
> 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)
Thankyou for the advice. I'll amend the wiki with both points.
- --
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.13 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEARECAAYFAlEj/yQACgkQ3kugKJsq1HZrPgCfdMT7LVkydEYG37Zg3PsZI2OA
TfkAn2HhjTTThLjC4nz6pX9f4nw8nILl
=9a3q
-----END PGP SIGNATURE-----
More information about the rt-users
mailing list