Closed
Bug 478771
Opened 16 years ago
Closed 15 years ago
Bugzilla::Search should drop invalid bug statuses from the search criteria
Categories
(Bugzilla :: Query/Bug List, defect)
Bugzilla
Query/Bug List
Tracking
()
RESOLVED
FIXED
Bugzilla 3.6
People
(Reporter: dkl, Assigned: dkl)
Details
Attachments
(2 files, 1 obsolete file)
1.09 KB,
patch
|
mkanat
:
review+
|
Details | Diff | Splinter Review |
1.09 KB,
patch
|
mkanat
:
review+
|
Details | Diff | Splinter Review |
This was brought to our attention by someone using the XMLRPC api to search the bugs database here at Red Hat. Basically in the Bugzilla::Search code it simply checks to see if the number of statuses specified in the search criteria matches the total number of bug statuses and if the equal it assumes you want all bugs regardless of status. This user had an old status in his list and had the CLOSED state omitted (to find all open bugs) and the system thought they wanted all.
https://bugzilla.redhat.com/show_bug.cgi?id=485777
The attached patch filters out the invalid statuses and then does the number comparison against the legal statuses list.
Dave
Attachment #362609 -
Flags: review?
![]() |
||
Updated•16 years ago
|
Attachment #362609 -
Flags: review? → review?(mkanat)
Comment 1•16 years ago
|
||
Comment on attachment 362609 [details] [diff] [review]
Patch to filter valid bug statuses in Bugzilla::Search (v1)
>Index: Bugzilla/Search.pm
>+ else {
>+ $params->param('bug_status', @bug_statuses);
>+ }
Did you mean to put valid_statuses there instead?
Attachment #362609 -
Flags: review?(mkanat) → review-
Assignee | ||
Comment 2•15 years ago
|
||
Thanks Max. Here is a new patch that should be correct and also works with latest trunk.
Assignee: query-and-buglist → dkl
Attachment #362609 -
Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #443276 -
Flags: review?(mkanat)
Comment 3•15 years ago
|
||
Comment on attachment 443276 [details] [diff] [review]
Patch to filter valid bug statuses in Bugzilla::Search (v2)
Looks good to me.
Attachment #443276 -
Flags: review?(mkanat) → review+
Comment 4•15 years ago
|
||
The Bugzilla UI or WebService can't trigger this, right? So there's no user-facing bug, so this is essentially an improvement for people who hack the URL or have custom WebServices, so it seems like it should go on HEAD, right?
Flags: approval+
OS: Linux → All
Hardware: x86 → All
Target Milestone: --- → Bugzilla 3.8
Assignee | ||
Comment 5•15 years ago
|
||
It can be triggered with the UI if some uses a bookmarked URL or saved search that still has the deleted status and therefore the same number of status values as the total number of valid statuses in Bugzilla (including CLOSED). This will fix those and the user can then resave their new search if desired. The WebService front end should not affected by this as it uses Bugzilla::WebService::Bug::search does not the same @bug_statuses == @legal_statuses type check and just takes the list of statuses that the client gives directly.
Assignee | ||
Comment 6•15 years ago
|
||
Committing to: bzr+ssh://dkl%40redhat.com@bzr.mozilla.org/bugzilla/trunk/ modified Bugzilla/Search.pm
Committed revision 7152
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Comment 7•15 years ago
|
||
Okay, so a backport to 3.6 sounds OK then.
Flags: approval3.6+
Target Milestone: Bugzilla 3.8 → Bugzilla 3.6
Assignee | ||
Comment 8•15 years ago
|
||
Here is the patch for 3.6 which is essentially the same as trunk. Let me know if I should go ahead and just r+ it from the prior review and check it in to the 3.6 branch.
Dave
Attachment #444336 -
Flags: review?(mkanat)
Comment 9•15 years ago
|
||
Comment on attachment 444336 [details] [diff] [review]
Patch to filter valid bug statuses in Bugzilla::Search (3.6) (v2)
Looks good.
Attachment #444336 -
Flags: review?(mkanat) → review+
Assignee | ||
Comment 10•15 years ago
|
||
Thanks Max.
Committing to: bzr+ssh://dkl%40redhat.com@bzr.mozilla.org/bugzilla/3.6/
modified Bugzilla/Search.pm
Committed revision 7093.
You need to log in
before you can comment on or make changes to this bug.
Description
•