[rt-users] Add Time difference in search result
AJ
aaron.mccarthy at southwestern.ie
Wed Jul 30 11:29:41 EDT 2014
Hi,
I have made a "datetime" CustomField. Whenever a ticket is changed from open
to resolve the date and time will be inserted into the custom field.
However I want it to display the time elapsed e.g. 40 minutes ago etc.
This is the code I am using in location
/html/Callbacks/MyRT/Elements/RT__Ticket/ColumnMap
<%init>
$COLUMN_MAP->{DifferenceReopenedTime} = {
title => 'Reopened', # loc
attribute => 'Reopened',
value => sub {
my $CFValue = $Ticket->FirstCustomFieldValue('13')
my $now = RT::Date->new($RT::SystemUser);
$now->SetToNow();
return $CFValue->AgeAsString();
}
};
</%init>
<%args>
$COLUMN_MAP
</%args>
Can anyone help
--
View this message in context: http://requesttracker.8502.n7.nabble.com/Add-Time-difference-in-search-result-tp58100.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.
More information about the rt-users
mailing list