Closed
Bug 601848
Opened 15 years ago
Closed 15 years ago
percentage_complete searches are broken in various ways
Categories
(Bugzilla :: Query/Bug List, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 4.2
People
(Reporter: mkanat, Assigned: mkanat)
References
Details
Attachments
(1 file)
14.25 KB,
patch
|
mkanat
:
review+
|
Details | Diff | Splinter Review |
One of the most broken search fields in Search.pm is percentage_complete, mostly because it's using a HAVING clause, so it can't be negated or involved in the AND/OR structure of boolean charts like other fields can.
Assignee | ||
Comment 1•15 years ago
|
||
This fully fixes the percentage_complete field! Basically there are two fixes involved:
1) Make actual_time come from a derived table instead of being part of an expression. This allows us to use percentage_complete and actual_time in the WHERE clause instead of in the HAVING clause, fixing most of our problems.
2) Make the percentage_complete column an integer when it's returned by the database, instead of a floating-point number. This makes the behavior of percentage_complete searches predictable and correct across all operators and both tested databases. I choose FLOOR instead of ROUND because that way 99.5% doesn't show up as 100% in buglists.
Assignee | ||
Comment 2•15 years ago
|
||
Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/trunk/
modified Bugzilla/Bug.pm
modified Bugzilla/Search.pm
modified xt/lib/Bugzilla/Test/Search/Constants.pm
modified xt/lib/Bugzilla/Test/Search/FieldTest.pm
Committed revision 7520.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
![]() |
||
Updated•15 years ago
|
Flags: approval?
Assignee | ||
Updated•15 years ago
|
Flags: approval? → approval+
You need to log in
before you can comment on or make changes to this bug.
Description
•