summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@redhat.com>2010-05-07 18:39:52 +0200
committerDavid Lawrence <dkl@redhat.com>2010-05-07 18:39:52 +0200
commit910d4cd251416fdcfe8cdb3d453208b16ae53000 (patch)
treed0ea11d7cf1ec632c3efa624384535ce3a4c0a45 /Bugzilla
parent4ec67697f3ea85ebf73f486f6dea1aba87d7da76 (diff)
downloadbugzilla-910d4cd251416fdcfe8cdb3d453208b16ae53000.tar.gz
bugzilla-910d4cd251416fdcfe8cdb3d453208b16ae53000.tar.xz
Bug 478771: Bugzilla::Search should drop invalid bug statuses from the search criteria
r/a=mkanat
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Search.pm12
1 files changed, 11 insertions, 1 deletions
diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm
index 9bdc35182..271e23298 100644
--- a/Bugzilla/Search.pm
+++ b/Bugzilla/Search.pm
@@ -312,7 +312,14 @@ sub init {
my @legal_statuses =
map {$_->name} @{Bugzilla::Field->new({name => 'bug_status'})->legal_values};
- if (scalar(@bug_statuses) == scalar(@legal_statuses)
+ # Filter out any statuses that have been removed completely that are still
+ # being used by the client
+ my @valid_statuses;
+ foreach my $status (@bug_statuses) {
+ push(@valid_statuses, $status) if grep($_ eq $status, @legal_statuses);
+ }
+
+ if (scalar(@valid_statuses) == scalar(@legal_statuses)
|| $bug_statuses[0] eq "__all__")
{
$params->delete('bug_status');
@@ -325,6 +332,9 @@ sub init {
$params->param('bug_status', grep(!is_open_state($_),
@legal_statuses));
}
+ else {
+ $params->param('bug_status', @valid_statuses);
+ }
}
if ($params->param('resolution')) {