diff options
author | Dylan William Hardison <dylan@hardison.net> | 2018-05-09 16:28:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-09 16:28:26 +0200 |
commit | 2c2b5a5644c17e2a9cc2d56fdbea76a25a24280f (patch) | |
tree | 85fd62c2ec982c67128de472ac1cc3d3904578d9 /extensions/PhabBugz/lib/WebService.pm | |
parent | 739676cf4b122cdec12981c2bc3a79c3f54aa7e4 (diff) | |
download | bugzilla-2c2b5a5644c17e2a9cc2d56fdbea76a25a24280f.tar.gz bugzilla-2c2b5a5644c17e2a9cc2d56fdbea76a25a24280f.tar.xz |
Revert "Bug 1440086 - Refactor PhabBugz extension code to use new User.pm module for better type checking"
This reverts commit 739676cf4b122cdec12981c2bc3a79c3f54aa7e4.
Diffstat (limited to 'extensions/PhabBugz/lib/WebService.pm')
-rw-r--r-- | extensions/PhabBugz/lib/WebService.pm | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/extensions/PhabBugz/lib/WebService.pm b/extensions/PhabBugz/lib/WebService.pm index f018ba702..32cea1b51 100644 --- a/extensions/PhabBugz/lib/WebService.pm +++ b/extensions/PhabBugz/lib/WebService.pm @@ -30,6 +30,7 @@ use Bugzilla::Extension::PhabBugz::Util qw( create_revision_attachment edit_revision_policy get_bug_role_phids + get_phab_bmo_ids get_needs_review get_project_phid get_revisions_by_ids @@ -306,7 +307,8 @@ sub needs_review { my $reviews = get_needs_review(); - my $authors = Bugzilla::Extension::PhabBugz::User->match({ + # map author phids to bugzilla users + my $author_id_map = get_phab_bmo_ids({ phids => [ uniq grep { defined } @@ -314,9 +316,9 @@ sub needs_review { @$reviews ] }); - - my %author_phab_to_id = map { $_->phid => $_->bugzilla_user->id } @$authors; - my %author_id_to_user = map { $_->bugzilla_user->id => $_->bugzilla_user } @$authors; + my %author_phab_to_id = map { $_->{phid} => $_->{id} } @$author_id_map; + my $author_users = Bugzilla::User->new_from_list([ map { $_->{id} } @$author_id_map ]); + my %author_id_to_user = map { $_->id => $_ } @$author_users; # bug data my $visible_bugs = $user->visible_bugs([ |