summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
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')) {