diff options
author | dklawren <dklawren@users.noreply.github.com> | 2018-05-11 19:10:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-11 19:10:09 +0200 |
commit | a1d7038494ee5fb327b21b48c7d1e5fb75b39e72 (patch) | |
tree | 8c88e015e615ee3801092d30d7e5ba6d87059c18 /extensions/PhabBugz/lib/WebService.pm | |
parent | a5b780358d0e8c9cd611a644b3d6168daac711e3 (diff) | |
download | bugzilla-a1d7038494ee5fb327b21b48c7d1e5fb75b39e72.tar.gz bugzilla-a1d7038494ee5fb327b21b48c7d1e5fb75b39e72.tar.xz |
Bug 1440086 - Refactor PhabBugz extension code to use new User.pm module for better type checking
Diffstat (limited to 'extensions/PhabBugz/lib/WebService.pm')
-rw-r--r-- | extensions/PhabBugz/lib/WebService.pm | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/extensions/PhabBugz/lib/WebService.pm b/extensions/PhabBugz/lib/WebService.pm index 32cea1b51..f018ba702 100644 --- a/extensions/PhabBugz/lib/WebService.pm +++ b/extensions/PhabBugz/lib/WebService.pm @@ -30,7 +30,6 @@ 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 @@ -307,8 +306,7 @@ sub needs_review { my $reviews = get_needs_review(); - # map author phids to bugzilla users - my $author_id_map = get_phab_bmo_ids({ + my $authors = Bugzilla::Extension::PhabBugz::User->match({ phids => [ uniq grep { defined } @@ -316,9 +314,9 @@ sub needs_review { @$reviews ] }); - 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; + + my %author_phab_to_id = map { $_->phid => $_->bugzilla_user->id } @$authors; + my %author_id_to_user = map { $_->bugzilla_user->id => $_->bugzilla_user } @$authors; # bug data my $visible_bugs = $user->visible_bugs([ |