diff options
author | bugreport%peshkin.net <> | 2004-08-21 06:49:17 +0200 |
---|---|---|
committer | bugreport%peshkin.net <> | 2004-08-21 06:49:17 +0200 |
commit | 88d26275229b5f52f435130496169766313c87b7 (patch) | |
tree | c71532045500b6e2335b1e5e2512d10b8846551b /Bugzilla | |
parent | 2f9f28d0bfb1f321d1548844a41aaf2d51789695 (diff) | |
download | bugzilla-88d26275229b5f52f435130496169766313c87b7.tar.gz bugzilla-88d26275229b5f52f435130496169766313c87b7.tar.xz |
Bug 224208 Add a higher level of categorization (.ie departments, locations, etc.)
patch by Albert Ting
r=joel, glob
a=myk
Diffstat (limited to 'Bugzilla')
-rwxr-xr-x | Bugzilla/Bug.pm | 10 | ||||
-rw-r--r-- | Bugzilla/Search.pm | 17 |
2 files changed, 23 insertions, 4 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index 8863f5432..d5aa5fd17 100755 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -48,6 +48,7 @@ sub fields { # Keep this ordering in sync with bugzilla.dtd my @fields = qw(bug_id alias creation_ts short_desc delta_ts reporter_accessible cclist_accessible + classification_id classification product component version rep_platform op_sys bug_status resolution bug_file_loc status_whiteboard keywords @@ -137,7 +138,8 @@ sub initBug { my $query = " SELECT - bugs.bug_id, alias, bugs.product_id, products.name, version, + bugs.bug_id, alias, products.classification_id, classifications.name, + bugs.product_id, products.name, version, rep_platform, op_sys, bug_status, resolution, priority, bug_severity, bugs.component_id, components.name, assigned_to, reporter, bug_file_loc, short_desc, target_milestone, @@ -147,8 +149,9 @@ sub initBug { reporter_accessible, cclist_accessible, estimated_time, remaining_time from bugs left join votes using(bug_id), - products, components + classifications, products, components where bugs.bug_id = $bug_id + AND classifications.id = products.classification_id AND products.id = bugs.product_id AND components.id = bugs.component_id group by bugs.bug_id"; @@ -159,7 +162,8 @@ sub initBug { if ((@row = &::FetchSQLData()) && $self->{'who'}->can_see_bug($bug_id)) { my $count = 0; my %fields; - foreach my $field ("bug_id", "alias", "product_id", "product", "version", + foreach my $field ("bug_id", "alias", "classification_id", "classification", + "product_id", "product", "version", "rep_platform", "op_sys", "bug_status", "resolution", "priority", "bug_severity", "component_id", "component", "assigned_to", "reporter", "bug_file_loc", "short_desc", 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; |