summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2014-01-17 07:11:55 +0100
committerDave Lawrence <dlawrence@mozilla.com>2014-01-17 07:11:55 +0100
commit22c96de30e07d73456cb336896f9c483f8790b8d (patch)
tree7de1c85b7b0d6dc1606c9cb3310cb8efbcee384c /Bugzilla
parent87941c04124e72fb70a7943f4b488f8153e3a6e6 (diff)
downloadbugzilla-22c96de30e07d73456cb336896f9c483f8790b8d.tar.gz
bugzilla-22c96de30e07d73456cb336896f9c483f8790b8d.tar.xz
Bug 960748 - Queries involving comment tags crash
r/a=glob
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Search.pm10
1 files changed, 9 insertions, 1 deletions
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;