From 22c96de30e07d73456cb336896f9c483f8790b8d Mon Sep 17 00:00:00 2001 From: Dave Lawrence Date: Fri, 17 Jan 2014 01:11:55 -0500 Subject: Bug 960748 - Queries involving comment tags crash r/a=glob --- Bugzilla/Search.pm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'Bugzilla') diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm index b196fca3b..b9946889d 100644 --- a/Bugzilla/Search.pm +++ b/Bugzilla/Search.pm @@ -307,7 +307,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 => { @@ -2867,6 +2868,13 @@ sub _multiselect_table { return "attachments INNER JOIN attach_data " . " ON attachments.attach_id = attach_data.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