Closed
Bug 600495
Opened 15 years ago
Closed 15 years ago
Searching by field ranges fails when chfieldto specified
Categories
(Bugzilla :: Query/Bug List, defect)
Tracking
()
VERIFIED
FIXED
Bugzilla 4.2
People
(Reporter: gerv, Assigned: mkanat)
References
Details
Attachments
(2 files, 1 obsolete file)
|
1021 bytes,
patch
|
mkanat
:
review+
|
Details | Diff | Splinter Review |
|
2.04 KB,
patch
|
mkanat
:
review+
|
Details | Diff | Splinter Review |
4.0: https://landfill.bugzilla.org/bugzilla-4.0-branch/buglist.cgi?chfieldto=2007-07-03&chfield=status_whiteboard&chfieldfrom=2007-07-01&chfieldvalue=nothingafds
=> One bug found.
Tip: https://landfill.bugzilla.org/bugzilla-tip/buglist.cgi?chfieldto=2007-07-03&chfield=status_whiteboard&chfieldfrom=2007-07-01&chfieldvalue=nothingafds
=> Zarro boogs.
This query picks out a change from many years ago, which is identical in the two databases. Removing chfieldto from the second URL shows up the bug (and another one, as it happens).
| Assignee | ||
Comment 1•15 years ago
|
||
I actually just re-discovered this independently, and have a fix for it.
| Assignee | ||
Updated•15 years ago
|
Target Milestone: --- → Bugzilla 4.2
| Assignee | ||
Comment 2•15 years ago
|
||
During refactoring, I added an optimization for chfieldto and chfieldfrom that added a delta_ts term into the SQL (which considerably speeds things up). However, logically that's only valid for chfieldfrom--there's no similar optimization that I can think of at the moment that's possible for chfieldto.
| Assignee | ||
Comment 3•15 years ago
|
||
Oops, v1 included some extra code.
Attachment #480425 -
Attachment is obsolete: true
Attachment #480426 -
Flags: review+
| Assignee | ||
Comment 4•15 years ago
|
||
Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/trunk/
modified Bugzilla/Search.pm
Committed revision 7504.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
| Reporter | ||
Comment 5•15 years ago
|
||
There's still something wrong here (may be a different bug, perhaps):
https://landfill.bugzilla.org/bugzilla-tip/buglist.cgi?chfieldto=1980-07-03&bug_id=1&chfieldfrom=1980-07-04
This should return no bugs - the range of dates is empty, as well as both dates being well before any time the bug was changed. The problem still occurs even if chfieldto is after chfieldfrom:
https://landfill.bugzilla.org/bugzilla-tip/buglist.cgi?chfieldto=1980-07-06&bug_id=1&chfieldfrom=1980-07-04
Gerv
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
| Assignee | ||
Comment 6•15 years ago
|
||
Ah, you're right.
If somebody doesn't specify a field value or a particular field that's changed, then the chfieldto parameter *does* need to check the delta_ts column.
| Assignee | ||
Comment 7•15 years ago
|
||
This patch fixes chfieldto to work by itself, and also adds tests to xt/search.t to make sure that we don't regress this in the future.
Attachment #481472 -
Flags: review+
| Assignee | ||
Comment 8•15 years ago
|
||
Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/trunk/
modified Bugzilla/Search.pm
modified xt/lib/Bugzilla/Test/Search/FieldTestNormal.pm
Committed revision 7524.
Status: REOPENED → RESOLVED
Closed: 15 years ago → 15 years ago
Resolution: --- → FIXED
| Reporter | ||
Comment 9•15 years ago
|
||
Yes, the relevant bzapi tests now pass.
Gerv
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•