[rt-users] Time Displays

Kristian Davies kristian.davies at gmail.com
Tue Feb 10 19:01:00 EST 2009


>        Thanks to Kristian Davies I have modifed my time entries to allow only
> "Days". The data is stores "as is", which is perfect. If someone enters
> "5", it is stored as "5". However, when I display a ticket, it still
> shows "min" next to the time fields. How can I get the time Displays to
> just show "Days"? Thanks.


In the interest of sharing - again, not my code:

local/html/Ticket/ Elements/ShowTime

%# END BPS TAGGED BLOCK }}}
% if ($minutes < 60) {
<&|/l, $minutes &>[_1] min</&>
% } elsif ($minutes < 480) {
<&|/l, sprintf("%.1f",$minutes / 60) &>[quant,_1,hour]</&> (<&|/l,
$minutes &>[_1] min</&>)
% } else {
<&|/l, sprintf("%.1f",$minutes / 480) &>[quant,_1,day]</&> (<&|/l,
sprintf("%.1f",$minutes / 60) &>[quant,_1,hour]</&>)
% }
<%ARGS>
$minutes
</%ARGS>

Kristian



More information about the rt-users mailing list