From 88d26275229b5f52f435130496169766313c87b7 Mon Sep 17 00:00:00 2001 From: "bugreport%peshkin.net" <> Date: Sat, 21 Aug 2004 04:49:17 +0000 Subject: Bug 224208 Add a higher level of categorization (.ie departments, locations, etc.) patch by Albert Ting r=joel, glob a=myk --- Bugzilla/Search.pm | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'Bugzilla/Search.pm') diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm index 91785963f..23bb34eae 100644 --- a/Bugzilla/Search.pm +++ b/Bugzilla/Search.pm @@ -96,6 +96,11 @@ sub init { push @wherepart, "bugs.product_id = map_products.id"; } + if (lsearch($fieldsref, 'map_classifications.name') >= 0) { + push @supptables, "classifications AS map_classifications"; + push @wherepart, "map_products.classification_id = map_classifications.id"; + } + if (lsearch($fieldsref, 'map_components.name') >= 0) { push @supptables, "components AS map_components"; push @wherepart, "bugs.component_id = map_components.id"; @@ -152,7 +157,7 @@ sub init { my @legal_fields = ("product", "version", "rep_platform", "op_sys", "bug_status", "resolution", "priority", "bug_severity", - "assigned_to", "reporter", "component", + "assigned_to", "reporter", "component", "classification", "target_milestone", "bug_group"); foreach my $field ($params->param()) { @@ -761,6 +766,16 @@ sub init { $term); }, + "^classification,(?!changed)" => sub { + # Generate the restriction condition + $f = $ff = "classifications.name"; + $funcsbykey{",$t"}->(); + $term = build_subselect("map_products.classification_id", + "classifications.id", + "classifications", + $term); + }, + "^keywords," => sub { &::GetVersionTable(); my @list; -- cgit v1.2.3-24-g4f1b