Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] PeoplePicker won't accept Multiple Users with the same name #1612

Closed
sionjlewis opened this issue Aug 4, 2023 · 5 comments
Closed
Labels
status:working-on-it Known issue / feature being addressed. Will use other "status:*" labels & comments for more detail. type:bug

Comments

@sionjlewis
Copy link

sionjlewis commented Aug 4, 2023

Bug Description

When we attempted to add multiple users with the same name (Charlotte Coker was out test for this as there are 3 different users set up with her name) it fails to surface any user after the first when you search:

image

When we search the user (Charlotte) initially all three user accounts display in the search result but after selecting one and starting to search for the second no more return (as screenshotted)

To Reproduce
Steps to reproduce the behaviour:

  1. Go to Azure > Azure Active Directory (AAD) > Users
  2. Add three accounts with the same names and different email addresses, for example:
  1. Add a four account with the same first name, foe example:
  1. Open or create a simple webpart hosting a PeoplePicker control with the following properties"
    <PeoplePicker
    context={this.props.context}
    titleText="People Picker"
    personSelectionLimit={200}
    showtooltip={true}
    onChange={this._getPeoplePickerItems}
    showHiddenInUI={false}
    principalTypes={[PrincipalType.User, PrincipalType.SharePointGroup, PrincipalType.SecurityGroup]}
    resolveDelay={1000} />

Expected behavior
I would like to see two or more John Smiths added to the field and replicate the SharePoint out-of-the-box people picker UX.

Suggested Fix
I understand that displaying three [John Smiths] [John Smiths] [John Smiths] will introduce another issue. Which [John Smiths] am I looking at. I currently see two options:

  1. Include a tooltip for each Person displaying their email address e.g, [email protected]
  2. Have an option to display Email Address(es) instead of Display Name(s)

Environment (please complete the following information):

  • OS: Windows 11
  • Browser: Chrome Version 115.0.5790.110 (Official Build) (64-bit) (and Edge)
  • Framework: SPFx 1.17.1, react 16.13.1, @pnp/spfx-controls-react 3.9.0, @pnp/spfx-property-controls 3.9.0, Node: >=16.13.0 <17.0.0
  • Context Microsoft Teams and SharePoint
@ghost
Copy link

ghost commented Aug 4, 2023

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

@ghost ghost added the Needs: Triage 🔍 label Aug 4, 2023
@github-actions
Copy link

github-actions bot commented Aug 4, 2023

Thank you for submitting your first issue to this project.

@NishkalankBezawada
Copy link
Contributor

Hi @sionjlewis

I tried to reproduce the issue with
John Smith [email protected]
John Smith [email protected]
John Smith [email protected]

and i guess i have found the fix.

MultipleUsersWithSameNamebutDifferentLoginNames

Will soon create a PR on this.

Thanks,
Nishkalank

@sionjlewis
Copy link
Author

Brilliant, thank you @NishkalankBezawada

@michaelmaillot michaelmaillot added status:working-on-it Known issue / feature being addressed. Will use other "status:*" labels & comments for more detail. type:bug and removed Needs: Triage 🔍 labels Sep 6, 2023
@michaelmaillot
Copy link
Collaborator

Closing as fixed in version 3.16.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:working-on-it Known issue / feature being addressed. Will use other "status:*" labels & comments for more detail. type:bug
Projects
None yet
Development

No branches or pull requests

3 participants