diff options
author | reed%reedloden.com <> | 2006-12-20 14:14:24 +0100 |
---|---|---|
committer | reed%reedloden.com <> | 2006-12-20 14:14:24 +0100 |
commit | 8850b0dc8bf5488cb9736bc4b7909b31d447081d (patch) | |
tree | e4cc0493c85c9a63e497c2b554abd7a2c2ab23ce | |
parent | 3f1a0a8168493175b6c44e18edc25bd655f8c8b2 (diff) | |
download | bugzilla-8850b0dc8bf5488cb9736bc4b7909b31d447081d.tar.gz bugzilla-8850b0dc8bf5488cb9736bc4b7909b31d447081d.tar.xz |
Bug 364195 - "No way to search for private comments" [p=reed r=justdave a=justdave]
-rw-r--r-- | Bugzilla/Field.pm | 1 | ||||
-rw-r--r-- | Bugzilla/Search.pm | 12 |
2 files changed, 13 insertions, 0 deletions
diff --git a/Bugzilla/Field.pm b/Bugzilla/Field.pm index 782ee5581..dd885cd55 100644 --- a/Bugzilla/Field.pm +++ b/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/Bugzilla/Search.pm b/Bugzilla/Search.pm index d0b0cd6ba..c20abc418 100644 --- a/Bugzilla/Search.pm +++ b/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 " . |