Remove trailing zeros in search, fix removal in bug getter

3col
Vitaliy Filippov 2015-03-05 13:04:50 +03:00
parent 46b762fdce
commit 477023a258
2 changed files with 4 additions and 1 deletions

View File

@ -4257,7 +4257,7 @@ sub get_value
if (defined $self->{$attr})
{
$self->{$attr} =~ s/\.?0+$//so if $field && $field->type == FIELD_TYPE_NUMERIC;
$self->{$attr} =~ s/((\.\d*[1-9])|\.)0+$/$2/so if $field && $field->type == FIELD_TYPE_NUMERIC;
return $self->{$attr};
}

View File

@ -222,6 +222,9 @@
[% SET url_quoted = bug.$column | url_quote_ns %]
<a href="[% field_obj.url.replace('\$1', url_quoted) %]">[% bug.$column | html %]</a>
[% END %]
[% ELSIF field_obj.type == constants.FIELD_TYPE_NUMERIC %]
[%# Remove trailing zeros %]
[% bug.$column.replace('((\.\d*[1-9])|\.)0+$', '$2') %]
[% ELSIF column == 'work_time' ||
column == 'remaining_time' ||
column == 'estimated_time' ||