Commit 8850b0dc authored by reed%reedloden.com's avatar reed%reedloden.com

Bug 364195 - "No way to search for private comments" [p=reed r=justdave a=justdave]

parent 3f1a0a81
......@@ -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'},
......
......@@ -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 " .
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment