]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 339270: When editing a simple search, the bug status is lost
authorFrédéric Buclin <LpSolit@gmail.com>
Mon, 18 Oct 2010 09:34:24 +0000 (11:34 +0200)
committerFrédéric Buclin <LpSolit@gmail.com>
Mon, 18 Oct 2010 09:34:24 +0000 (11:34 +0200)
r/a=mkanat

buglist.cgi

index 2827a2bee35a8ea197237c7befaaa3bc7efae1cc..0ed8975ceb029fc508f87e47af361162269eb8e5 100755 (executable)
@@ -847,6 +847,15 @@ if (!$order) {
 
 my @orderstrings = split(/,\s*/, $order);
 
+# The bug status defined by a specific search is of type __foo__, but
+# Search.pm converts it into a list of real bug statuses, which cannot
+# be used when editing the specific search again. So we restore this
+# parameter manually.
+my $input_bug_status;
+if ($params->param('query_format') eq 'specific') {
+    $input_bug_status = $params->param('bug_status');
+}
+
 # Generate the basic SQL query that will be used to generate the bug list.
 my $search = new Bugzilla::Search('fields' => \@selectcolumns, 
                                   'params' => $params,
@@ -1057,6 +1066,9 @@ if ($format->{'extension'} eq 'ics') {
     }
 }
 
+# Restore the bug status used by the specific search.
+$params->param('bug_status', $input_bug_status) if $input_bug_status;
+
 # The list of query fields in URL query string format, used when creating
 # URLs to the same query results page with different parameters (such as
 # a different sort order or when taking some action on the set of query