summaryrefslogtreecommitdiffstats
path: root/extensions/Review
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2013-09-25 18:27:40 +0200
committerByron Jones <bjones@mozilla.com>2013-09-25 18:27:40 +0200
commiteaa48fa1704264c4266782dcc71051d822b02f93 (patch)
tree273bd9b1ed2a4ece01ca4a925e8119eec38feb98 /extensions/Review
parent7adf94460e6964e20f520f31db6b731ae9b88f58 (diff)
downloadbugzilla-eaa48fa1704264c4266782dcc71051d822b02f93.tar.gz
bugzilla-eaa48fa1704264c4266782dcc71051d822b02f93.tar.xz
Bug 919881: Count of pending reviews for suggested reviewers doesn't take into account feedback requests
Diffstat (limited to 'extensions/Review')
-rw-r--r--extensions/Review/Extension.pm11
-rw-r--r--extensions/Review/lib/WebService.pm2
2 files changed, 8 insertions, 5 deletions
diff --git a/extensions/Review/Extension.pm b/extensions/Review/Extension.pm
index ed155bbd2..ed8191ab8 100644
--- a/extensions/Review/Extension.pm
+++ b/extensions/Review/Extension.pm
@@ -98,14 +98,15 @@ sub _bug_mentor {
sub _user_review_count {
my ($self) = @_;
if (!exists $self->{review_count}) {
- ($self->{review_count}) = Bugzilla->dbh->selectrow_array(
+ my $dbh = Bugzilla->dbh;
+ ($self->{review_count}) = $dbh->selectrow_array(
"SELECT COUNT(*)
- FROM flags
+ FROM flags
INNER JOIN flagtypes ON flagtypes.id = flags.type_id
- WHERE flags.requestee_id = ?
- AND flagtypes.name = ?",
+ WHERE flags.requestee_id = ?
+ AND " . $dbh->sql_in('flagtypes.name', [ "'review'", "'feedback'" ]),
undef,
- $self->id, 'review',
+ $self->id,
);
}
return $self->{review_count};
diff --git a/extensions/Review/lib/WebService.pm b/extensions/Review/lib/WebService.pm
index 963d96233..acce32d2b 100644
--- a/extensions/Review/lib/WebService.pm
+++ b/extensions/Review/lib/WebService.pm
@@ -177,6 +177,8 @@ An array of hashes with the following keys/values:
=item C<name> (string) - The user's display name (may not match the Bugzilla "real name").
+=item C<review_count> (string) - The number of "review" and "feedback" requests in the user's queue.
+
=back
=back