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

fix(contacts): fix loop and use only resolved contacts from scim #3829

Merged
merged 5 commits into from
Sep 13, 2024

Conversation

sreenara
Copy link
Contributor

@sreenara sreenara commented Sep 13, 2024

COMPLETES # NA

This pull request addresses

an error and crash while populating the contact details from the SCIM response. SCIM doesn't always return the same list of cloud contacts as present in the contactsDataMap. Due to this, a loop over the contactsDataMap will always cause a problem.

For example, you might have 5 cloud contacts in your list. Out of these 3 are in the same org as you, 2 are not.
In the SCIM response, even if you query for all 5, you'll receive only 3 in the response. The 2 remaining contacts are unresolvable and therefore, we cannot get any details about them.

by making the following changes

Fixed the loop to use the SCIM response list instead of contactsDataMap.

Change Type

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Tooling change
  • Internal code refactor

The following scenarios where tested

  1. Get all contacts cloud and custom. Check that the resolution works even with cloud contacts not in the same org
  2. Delete a cloud contact and custom contact
  3. Delete a contact group
  4. Create a custom contact and cloud contact

I certified that

  • I have read and followed contributing guidelines

  • I discussed changes with code owners prior to submitting this pull request

  • I have not skipped any automated checks

  • All existing and new tests passed

  • I have updated the documentation accordingly


Make sure to have followed the contributing guidelines before submitting.

@sreenara sreenara added the validated If the pull request is validated for automation. label Sep 13, 2024
@sreenara sreenara requested a review from a team as a code owner September 13, 2024 11:19
Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-3829.d3m3l2kee0btzx.amplifyapp.com

@sreenara sreenara merged commit 523ae6d into webex:next Sep 13, 2024
10 of 11 checks passed
@sreenara sreenara deleted the handle-scim-response branch September 13, 2024 11:40
pagour98 pushed a commit to pagour98/webex-js-sdk that referenced this pull request Sep 27, 2024
pagour98 pushed a commit to pagour98/webex-js-sdk that referenced this pull request Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
validated If the pull request is validated for automation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant