From: lpsolit%gmail.com <> Date: Thu, 17 Dec 2009 23:10:33 +0000 (+0000) Subject: Bug 535309: The bug_status and resolution fields in query.cgi can be ignored by Searc... X-Git-Tag: bugzilla-3.5.3~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c5612a1fdcbdfd6aacf9e85e1f74c399ba021fa5;p=thirdparty%2Fbugzilla.git Bug 535309: The bug_status and resolution fields in query.cgi can be ignored by Search.pm if you deactivated some resolutions or bug statuses - Patch by Frédéric Buclin r/a=mkanat --- diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm index 7b8ac10e2b..bb23f6fdc7 100644 --- a/Bugzilla/Search.pm +++ b/Bugzilla/Search.pm @@ -304,7 +304,8 @@ sub init { # into their equivalent lists of open and closed statuses. if ($params->param('bug_status')) { my @bug_statuses = $params->param('bug_status'); - my @legal_statuses = @{get_legal_field_values('bug_status')}; + # Also include inactive bug statuses, as you can query them. + my @legal_statuses = @{Bugzilla::Field->new({name => 'bug_status'})->legal_values}; if (scalar(@bug_statuses) == scalar(@legal_statuses) || $bug_statuses[0] eq "__all__") { @@ -322,7 +323,8 @@ sub init { if ($params->param('resolution')) { my @resolutions = $params->param('resolution'); - my $legal_resolutions = get_legal_field_values('resolution'); + # Also include inactive resolutions, as you can query them. + my $legal_resolutions = Bugzilla::Field->new({name => 'resolution'})->legal_values; if (scalar(@resolutions) == scalar(@$legal_resolutions)) { $params->delete('resolution'); }