diff --git a/webtools/bugzilla/Bugzilla/Field.pm b/webtools/bugzilla/Bugzilla/Field.pm index 782ee558154..dd885cd55b9 100644 --- a/webtools/bugzilla/Bugzilla/Field.pm +++ b/webtools/bugzilla/Bugzilla/Field.pm @@ -168,6 +168,7 @@ use constant DEFAULT_FIELDS => ( {name => 'creation_ts', desc => 'Creation date', in_new_bugmail => 1}, {name => 'delta_ts', desc => 'Last changed date', in_new_bugmail => 1}, {name => 'longdesc', desc => 'Comment'}, + {name => 'longdescs.isprivate', desc => 'Comment is private'}, {name => 'alias', desc => 'Alias'}, {name => 'everconfirmed', desc => 'Ever Confirmed'}, {name => 'reporter_accessible', desc => 'Reporter Accessible'}, diff --git a/webtools/bugzilla/Bugzilla/Search.pm b/webtools/bugzilla/Bugzilla/Search.pm index d0b0cd6ba15..c20abc418a3 100644 --- a/webtools/bugzilla/Bugzilla/Search.pm +++ b/webtools/bugzilla/Bugzilla/Search.pm @@ -707,6 +707,18 @@ sub init { "ON $table.bug_id = bugs.bug_id $extra"); $f = "$table.thetext"; }, + "^longdescs\.isprivate," => sub { + my $table = "longdescs_$chartid"; + my $extra = ""; + if (Bugzilla->params->{"insidergroup"} + && !Bugzilla->user->in_group(Bugzilla->params->{"insidergroup"})) + { + $extra = "AND $table.isprivate < 1"; + } + push(@supptables, "INNER JOIN longdescs AS $table " . + "ON $table.bug_id = bugs.bug_id $extra"); + $f = "$table.isprivate"; + }, "^work_time,changedby" => sub { my $table = "longdescs_$chartid"; push(@supptables, "INNER JOIN longdescs AS $table " .