]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 960748 - Queries involving comment tags crash
authorDave Lawrence <dlawrence@mozilla.com>
Fri, 17 Jan 2014 06:11:55 +0000 (01:11 -0500)
committerDave Lawrence <dlawrence@mozilla.com>
Fri, 17 Jan 2014 06:11:55 +0000 (01:11 -0500)
r/a=glob

Bugzilla/Search.pm

index b196fca3b1d7583c9c73e5f8fb8631c8df43bfa7..b9946889d0dc4386882c2d21a3faee986b4dbe5e 100644 (file)
@@ -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;