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

This commit is contained in:
reed%reedloden.com 2006-12-20 05:14:24 +00:00
Родитель 4d3552bade
Коммит 943007ce9b
2 изменённых файлов: 13 добавлений и 0 удалений

Просмотреть файл

@ -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 " .