From 98a6885065b7e53e9b8ec2e402ef24924801723f Mon Sep 17 00:00:00 2001 From: Dave Lawrence Date: Fri, 17 Jan 2014 01:21:03 -0500 Subject: Bug 960883 - backport bug 960748 to bmo/4.2 to fix issue with queries involving comment tags crashing --- Bugzilla/Search.pm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'Bugzilla/Search.pm') diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm index 0c52553bb..04f549316 100644 --- a/Bugzilla/Search.pm +++ b/Bugzilla/Search.pm @@ -336,7 +336,8 @@ use constant OPERATOR_FIELD_OVERRIDE => { _non_changed => \&_product_nonchanged, }, tag => MULTI_SELECT_OVERRIDE, - + comment_tag => MULTI_SELECT_OVERRIDE, + # Timetracking Fields deadline => { _non_changed => \&_deadline }, percentage_complete => { @@ -3033,6 +3034,13 @@ sub _multiselect_table { "flags.status"); return "flags INNER JOIN flagtypes ON flags.type_id = flagtypes.id"; } + elsif ($field eq 'comment_tag') { + $args->{_extra_where} = " AND longdescs.isprivate = 0" + if !$self->_user->is_insider; + $args->{full_field} = 'longdescs_tags.tag'; + return "longdescs INNER JOIN longdescs_tags". + " ON longdescs.comment_id = longdescs_tags.comment_id"; + } my $table = "bug_$field"; $args->{full_field} = "bug_$field.value"; return $table; -- cgit v1.2.3-24-g4f1b