Closed Bug 535309 Opened 10 years ago Closed 10 years ago
_status and resolution fields in query .cgi can be ignored by Search .pm if you deactivated some resolutions or bug statuses
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.
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+
(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: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.