diff options
author | Max Kanat-Alexander <mkanat@bugzilla.org> | 2010-10-05 07:55:23 +0200 |
---|---|---|
committer | Max Kanat-Alexander <mkanat@bugzilla.org> | 2010-10-05 07:55:23 +0200 |
commit | daa533e7c6d1c6ff2e8600c5178ac75bf7a2538c (patch) | |
tree | 24553b5935a2317439a031ca1d4543c905b1b63b /Bugzilla/Bug.pm | |
parent | e861a6de8f1310f99c1b04c64513c7b8633d2b9b (diff) | |
download | bugzilla-daa533e7c6d1c6ff2e8600c5178ac75bf7a2538c.tar.gz bugzilla-daa533e7c6d1c6ff2e8600c5178ac75bf7a2538c.tar.xz |
Bug 601848: Fix percentage_complete searches for all operators on both MySQL
and PostgreSQL
r=mkanat, a=mkanat (module owner)
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 { |