diff options
Diffstat (limited to 'Bugzilla/Bug.pm')
-rw-r--r-- | Bugzilla/Bug.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index fccf94a02..327e55ccc 100644 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -3327,7 +3327,10 @@ sub percentage_complete { my $actual = $self->actual_time; my $total = $remaining + $actual; return undef if $total == 0; - return 100 * ($actual / $total); + # Search.pm truncates this value to an integer, so we want to as well, + # since this is mostly used in a test where its value needs to be + # identical to what the database will return. + return int(100 * ($actual / $total)); } sub product { |