summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorMax Kanat-Alexander <mkanat@bugzilla.org>2011-03-01 16:41:44 +0100
committerMax Kanat-Alexander <mkanat@bugzilla.org>2011-03-01 16:41:44 +0100
commitdddef33ef5bbbaba4e82d00ebe87877e474f5ea2 (patch)
tree8e07c164ff5ac4ac7a16526573b7fa73405e99c8 /Bugzilla
parent86d6af6970a887fa12ee65aacdb9086836d773fd (diff)
downloadbugzilla-dddef33ef5bbbaba4e82d00ebe87877e474f5ea2.tar.gz
bugzilla-dddef33ef5bbbaba4e82d00ebe87877e474f5ea2.tar.xz
Bug 637426: Fix every boolean chart operator type for the bug_group search
field in Search.pm. (This also makes OR searches work against the bug_group field.) r=mkanat, a=mkanat
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Search.pm33
1 files changed, 6 insertions, 27 deletions
diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm
index 3af5b98cd..0262e7178 100644
--- a/Bugzilla/Search.pm
+++ b/Bugzilla/Search.pm
@@ -277,9 +277,7 @@ use constant OPERATOR_FIELD_OVERRIDE => {
blocked => {
_non_changed => \&_blocked_nonchanged,
},
- bug_group => {
- _non_changed => \&_bug_group_nonchanged,
- },
+ bug_group => MULTI_SELECT_OVERRIDE,
classification => {
_non_changed => \&_classification_nonchanged,
},
@@ -2364,30 +2362,6 @@ sub _percentage_complete {
$self->_add_extra_column('actual_time');
}
-sub _bug_group_nonchanged {
- my ($self, $args) = @_;
- my ($chart_id, $joins, $field) = @$args{qw(chart_id joins field)};
-
- my $map_table = "bug_group_map_$chart_id";
-
- push(@$joins, { table => 'bug_group_map', as => $map_table });
-
- my $groups_table = "groups_$chart_id";
- my $full_field = "$groups_table.name";
- $args->{full_field} = $full_field;
- $self->_do_operator_function($args);
- my $term = $args->{term};
- my $groups_join = {
- table => 'groups',
- as => $groups_table,
- from => "$map_table.group_id",
- to => 'id',
- extra => [$term],
- };
- push(@$joins, $groups_join);
- $args->{term} = "$full_field IS NOT NULL";
-}
-
sub _attach_data_thedata {
my ($self, $args) = @_;
my ($chart_id, $joins) = @$args{qw(chart_id joins)};
@@ -2688,6 +2662,11 @@ sub _multiselect_table {
return "bug_tag INNER JOIN tags ON bug_tag.tag_id = tags.id"
. " AND user_id = " . $self->_user->id;
}
+ elsif ($field eq 'bug_group') {
+ $args->{full_field} = 'groups.name';
+ return "bug_group_map INNER JOIN groups
+ ON bug_group_map.group_id = groups.id";
+ }
my $table = "bug_$field";
$args->{full_field} = "bug_$field.value";
return $table;