summaryrefslogtreecommitdiffstats
path: root/extensions/Review
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/Review')
-rw-r--r--extensions/Review/Extension.pm8
-rwxr-xr-xextensions/Review/bin/migrate_mentor_from_whiteboard.pl2
-rw-r--r--extensions/Review/lib/WebService.pm2
3 files changed, 8 insertions, 4 deletions
diff --git a/extensions/Review/Extension.pm b/extensions/Review/Extension.pm
index 47edd69a6..72f16e3b6 100644
--- a/extensions/Review/Extension.pm
+++ b/extensions/Review/Extension.pm
@@ -284,10 +284,14 @@ sub object_columns {
my ($self, $args) = @_;
my ($class, $columns) = @$args{qw(class columns)};
if ($class->isa('Bugzilla::Product')) {
- push @$columns, 'reviewer_required';
+ my $dbh = Bugzilla->dbh;
+ my @new_columns = qw(reviewer_required);
+ push @$columns, grep { $dbh->bz_column_info($class->DB_TABLE, $_) } @new_columns;
}
elsif ($class->isa('Bugzilla::User')) {
- push @$columns, qw(review_request_count feedback_request_count needinfo_request_count);
+ my $dbh = Bugzilla->dbh;
+ my @new_columns = qw(review_request_count feedback_request_count needinfo_request_count);
+ push @$columns, grep { $dbh->bz_column_info($class->DB_TABLE, $_) } @new_columns;
}
}
diff --git a/extensions/Review/bin/migrate_mentor_from_whiteboard.pl b/extensions/Review/bin/migrate_mentor_from_whiteboard.pl
index c6b69006f..debf173a7 100755
--- a/extensions/Review/bin/migrate_mentor_from_whiteboard.pl
+++ b/extensions/Review/bin/migrate_mentor_from_whiteboard.pl
@@ -36,7 +36,7 @@ EOF
<>;
# we need to be logged in to do user searching and update bugs
-my $nobody = Bugzilla::User->check({ name => 'nobody@mozilla.org' });
+my $nobody = Bugzilla::User->check({ name => Bugzilla->params->{'nobody_user'} });
$nobody->{groups} = [ Bugzilla::Group->get_all ];
Bugzilla->set_user($nobody);
diff --git a/extensions/Review/lib/WebService.pm b/extensions/Review/lib/WebService.pm
index 3f6816916..0c54d725a 100644
--- a/extensions/Review/lib/WebService.pm
+++ b/extensions/Review/lib/WebService.pm
@@ -51,7 +51,7 @@ sub suggestions {
# we always need to be authentiated to perform user matching
my $user = Bugzilla->user;
if (!$user->id) {
- Bugzilla->set_user(Bugzilla::User->check({ name => 'nobody@mozilla.org' }));
+ Bugzilla->set_user(Bugzilla::User->check({ name => Bugzilla->params->{'nobody_user'} }));
push @reviewers, @{ $bug->mentors };
Bugzilla->set_user($user);
} else {