Closed Bug 535309 Opened 15 years ago Closed 15 years ago

The bug_status and resolution fields in query.cgi can be ignored by Search.pm if you deactivated some resolutions or bug statuses

Categories

(Bugzilla :: Query/Bug List, defect)

3.5.2
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 3.6

People

(Reporter: LpSolit, Assigned: LpSolit)

References

Details

(Keywords: regression)

Attachments

(1 file)

Attached patch patch, v1 (deleted) — Splinter Review
Search.pm looks at the number of bug statuses, respectively resolutions, passed to it to determine if you selected them all. If yes, then it ignores the bug status or resolution list as this criteria is non-restrictive (to make the SQL query faster). The problem is that if you deactivated N bug statuses or resolutions (see bug 456743) and you select all but N bug statuses or resolutions in query.cgi, it thinks that you selected them all because the counts are equal: same number of selected items and active values. As query.cgi correctly lists inactive values together with active ones, Search.pm should also look at active *and* inactive values before deciding that you selected them all.
Flags: blocking3.6+
Attachment #417943 - Flags: review?(mkanat)
Comment on attachment 417943 [details] [diff] [review]
patch, v1

I think Bugzilla::Field::Choice->type('resolution')->get_all might be more reliable, since who knows what we'll do with legal_values in the future in terms of disabled choices.

But otherwise this generally looks fine.
Attachment #417943 - Flags: review?(mkanat) → review+
Flags: approval+
(In reply to comment #1)
> I think Bugzilla::Field::Choice->type('resolution')->get_all might be more
> reliable, since who knows what we'll do with legal_values in the future

->legal_values is what is used in query.cgi. So I use it here too for consistency, and this way we are sure to compare comparable lists.


Checking in Bugzilla/Search.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Search.pm,v  <--  Search.pm
new revision: 1.179; previous revision: 1.178
done
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Blocks: 539212
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: