Adding user to pull request does not prioritize users with repo write access
Asked by andytomlin:

When creating a pull request I cannot find users reliably. For example, in pics below Chris Brewer is a user with write access![atlassianbug2.png](https://community.atlassian.com/t5/image/serverpage/image-id/212597i73FBFE93BA893452/image-size/large?v=v2&px=999 "atlassianbug2.png")

However when I try to add him to a pull request he is not in the search results - including if you scroll it down. You cannot add by email address either

![atlassianbug1.png](https://community.atlassian.com/t5/image/serverpage/image-id/212598iCEC4EC670973C58D/image-size/large?v=v2&px=999 "atlassianbug1.png")

It seems like users with write access to the repo should be high priority search candidates. I have seen this problematic behavior in other user input selector dialog boxes.


Answers:
author: Theodora Boudale
body: Hi [@andytomlin](/t5/user/viewprofilepage/user-id/4253715),

I triggered a sync in our permissions system for this user and for the repository. Could you please check if you are able to find this user now when adding reviewers to a PR of this repo?

Kind regards,  
Theodora

comments: author: andytomlin
body: Theodora,

We worked around the problem with Chris by having him navigate to the pull and make a comment. This then put him at the top of the list to be added to the pull.

However Ashwini Kumar is the same test case - he has permissions to the repo. Unfortunately I cant tell if he is the correct reviewer as there are a lot of Ashwini Kumar's. I have asked him to add a unique pic to his profile so when he does that I will retest.

Either way it sucks not to be able to add reviewers via email address in a public repo. The current dialog is pretty useless as you just have a long list of names and no way to discriminate or tell if its the right or the wrong user. Certainly with Ashwini its not obvious that the Ashwini with write privileges is the first one. Note that in both Chris and Ashwini's cases they had not made a commit to the repo.


author: andytomlin
body: Ok, Ashwini added a profile pic and I can confirm he does not show up in the add reviewer drop down. However I see his profile pic in the user and group access in repository settings.

It is definitely a bug

I would recommend any dialog box where your selecting a user you allow the use of email address.


author: Theodora Boudale
body: Hi [@andytomlin](/t5/user/viewprofilepage/user-id/4253715),

I made the same sync for the user Ashwini that has access to your repo.

Could you please let me know if you are able to find this user now when adding PR reviewers?

Users with access to the repo should have a label 'MEMBER' next to their name in the user picker dropdown, as follows:

![Screenshot 2022-09-02 at 12.39.16.png](https://community.atlassian.com/t5/image/serverpage/image-id/214090iB6D433E1C7009BB9/image-size/large?v=v2&px=999 "Screenshot 2022-09-02 at 12.39.16.png")

If a user doesn't have this, it's not one of your users with explicit access.

I have created a request for prioritizing users with explicit access in that user picker for public repos (this issue occurs with public repos, for private repos only team members are displayed):

* <https://jira.atlassian.com/browse/BCLOUD-22118>

Kind regards,  
Theodora


author: andytomlin
body: I can confirm that syncing the user did **not** fix the issue. Ashwini is not in the drop down.


author: Theodora Boudale
body: Hi [@andytomlin](/t5/user/viewprofilepage/user-id/4253715),

Just double-checking if you scrolled down the list that shows users past the first 6 results?

If the user still doesn't show, the workarounds I can suggest at the moment would be either asking the user to leave a comment in the PR, like you did with Chris, or alternatively add the user via API by updating the PR:

* <https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pullrequests/#api-repositories-workspace-repo-slug-pullrequests-pull-request-id-put>

Kind regards,  
Theodora


author: andytomlin
body: yes, and the user does not show up


author: Theodora Boudale
body: Hi [@andytomlin](/t5/user/viewprofilepage/user-id/4253715),

I have reached out to the development team to check if there is anything more we can do. I'll let you know as soon as I have an update.

Kind regards,  
Theodora


author: Theodora Boudale
body: Hi [@andytomlin](/t5/user/viewprofilepage/user-id/4253715),

I reached out to the development team, the user picker recommends users to select as a reviewer based on how much the user has commented, mentioned others, or been mentioned.

Our suggestion would be to ask the user to leave a comment in the PR, like you did before with Chris, so that the user gets prioritized. The other workaround would be adding the user as a PR reviewer via our API.

Kind regards,  
Theodora


author: andytomlin
body: Yes, we know how it can be worked around, but its a bit clunky. I would still recommend adding ability to add user by email.


author: Theodora Boudale
body: Hi [@andytomlin](/t5/user/viewprofilepage/user-id/4253715),

I understand what you're saying, I have modified the feature request I opened earlier to make it specifically about adding PR reviewers via email.

I also found that we have an existing bug report about team members not being prioritised as PR reviewers in public repos: <https://jira.atlassian.com/browse/BCLOUD-21226>  
I would suggest selecting the "This affects my team" link in there to indicate you are affected by this.

When we have an update for either issue, it will be posted in the respective feature request or bug report.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud