summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2014-01-17 07:21:03 +0100
committerDave Lawrence <dlawrence@mozilla.com>2014-01-17 07:21:03 +0100
commit98a6885065b7e53e9b8ec2e402ef24924801723f (patch)
tree27e71e0f6abed90a5731f47ebeb36275646a75a5 /Bugzilla
parent508834a6e1af869ce1342bc8da5dcb2896c0f3e7 (diff)
downloadbugzilla-98a6885065b7e53e9b8ec2e402ef24924801723f.tar.gz
bugzilla-98a6885065b7e53e9b8ec2e402ef24924801723f.tar.xz
Bug 960883 - backport bug 960748 to bmo/4.2 to fix issue with queries involving comment tags crashing
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 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;