diff options
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; |