diff options
author | Kohei Yoshino <kohei.yoshino@gmail.com> | 2018-07-27 19:26:55 +0200 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2018-07-27 19:26:55 +0200 |
commit | f3f85f5bb8328a7264534a121c412938febda824 (patch) | |
tree | da9e3a86ab62c77dbf725839c845ef6ec2ad1fcf /Bugzilla | |
parent | 694a37b9debdf280d279b39b44329adda5caff40 (diff) | |
download | bugzilla-f3f85f5bb8328a7264534a121c412938febda824.tar.gz bugzilla-f3f85f5bb8328a7264534a121c412938febda824.tar.xz |
Bug 1320977 - Add review/feedback/needinfo request counts and block statuses to /rest/user and /rest/user/suggest responses
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/WebService/User.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Bugzilla/WebService/User.pm b/Bugzilla/WebService/User.pm index 5bb5e32c1..c569cf9d8 100644 --- a/Bugzilla/WebService/User.pm +++ b/Bugzilla/WebService/User.pm @@ -154,7 +154,7 @@ sub suggest { return { users => [] } if length($s) < 3; my $dbh = Bugzilla->dbh; - my @select = ('realname AS real_name', 'login_name AS name'); + my @select = ('userid AS id', 'realname AS real_name', 'login_name AS name'); my $order = 'last_seen_date DESC'; my $where; state $have_mysql = $dbh->isa('Bugzilla::DB::Mysql'); @@ -190,11 +190,15 @@ sub suggest { my @users = map { { + id => $self->type(int => $_->{id}), real_name => $self->type(string => $_->{real_name}), name => $self->type(email => $_->{name}), } } @$results; + Bugzilla::Hook::process('webservice_user_suggest', + { webservice => $self, params => $params, users => \@users }); + return { users => \@users }; } |