I wonder whether is possible to show the plain TimeWorked field in the search results, instead of the one formated like “15 minutes” or “1 hour and 5 minutes”. Do you know how to do it?
I like to export the search results to a spreadsheet and get the total for that column, but I can not do so because of the format. I would like the column would show the values in plain minutes like “25”, “10”, etc.
I owe you one. Thank you very much for pointing out towards the solution. I created a column map following the example and now I can show the time worked in each ticket without format.
This is what I did, just in case anybody has the same question.
Create the file /usr/local/share/request-tracker4/html/Callbacks/MyRT/Elements/RT__Ticket/ColumnMap/Once with the following content:
<%init>
$COLUMN_MAP->{'MinutesWorked'} = {
title => 'MinutesWorked',
attribute => 'MinutesWorked',
value => sub {
my $ticket = shift;
return $ticket->TimeWorked;
}
};
</%init>
<%args>
$COLUMN_MAP
</%args>
Then, create the file /usr/local/share/request-tracker4/html/Callbacks/MyRT/Search/Elements/BuildFormatString/Defaultwith this content: