summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgerv%gerv.net <>2002-11-05 07:43:28 +0100
committergerv%gerv.net <>2002-11-05 07:43:28 +0100
commit952d1ad687cb0ad29188c71fab2ad40e5ec984ba (patch)
treeff6599d61c54d4619d5944c4f7129958601e41e4
parent807d3057ff10203f9041f0ead7763e05e6e85184 (diff)
downloadbugzilla-952d1ad687cb0ad29188c71fab2ad40e5ec984ba.tar.gz
bugzilla-952d1ad687cb0ad29188c71fab2ad40e5ec984ba.tar.xz
Bug 173571 - Turn "all selected" into "none selected" for efficiency. Patch by gerv; r=justdave.
-rw-r--r--Bugzilla/Search.pm20
1 files changed, 20 insertions, 0 deletions
diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm
index 2360d95e4..6477d7e61 100644
--- a/Bugzilla/Search.pm
+++ b/Bugzilla/Search.pm
@@ -68,6 +68,8 @@ sub init {
my @specialchart;
my @andlist;
+ &::GetVersionTable();
+
# First, deal with all the old hard-coded non-chart-based poop.
if (lsearch($fieldsref, 'map_assigned_to.login_name') >= 0 ||
lsearch($fieldsref, 'map_assigned_to.realname') >= 0) {
@@ -116,6 +118,24 @@ sub init {
push(@specialchart, ["bug_id", $type, join(',', $params->param('bug_id'))]);
}
+ # If the user has selected all of either status or resolution, change to
+ # selecting none. This is functionally equivalent, but quite a lot faster.
+ if ($params->param('bug_status')) {
+ my @bug_statuses = $params->param('bug_status');
+
+ if (scalar(@bug_statuses) == scalar(@::legal_bug_status)) {
+ $params->delete('bug_status');
+ }
+ }
+
+ if ($params->param('resolution')) {
+ my @resolutions = $params->param('resolution');
+
+ if (scalar(@resolutions) == scalar(@::legal_resolution)) {
+ $params->delete('resolution');
+ }
+ }
+
my @legal_fields = ("product", "version", "rep_platform", "op_sys",
"bug_status", "resolution", "priority", "bug_severity",
"assigned_to", "reporter", "component",