Skip to content

[HOLD for payment 2024-02-01] [$500] Room - Error is "No results found" when re-inviting contact number without country code #33301

Closed

Description

@kbecciv

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 1.4.14.0
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:

issue found when executed #31010

Action Performed:

Scenario 1: Room

  1. Go to room (workspace visibility).
  2. Click on room header > Members.
  3. Click Invite.
  4. Invite a contact number without country code.
  5. Re-invite the same contact number again without country code.
  6. Re-invite the same contact number again with country code

Scenario 2: Workspace

  1. Go to Settings - Workspace
  2. Select Members
  3. Select Invite
  4. Invite a contact number without country code.
  5. Re-invite the same contact number again without country code.
  6. Re-invite the same contact number again with country code

Expected Result:

The error message for contact number that is an existing member is "{login} is already a member of {name}".

Actual Result:

There is no error message at all.

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

20240105_215121.1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0180e4026b587192bb
  • Upwork Job ID: 1737144751815933952
  • Last Price Increase: 2023-12-26
  • Automatic offers:
    • Ollyws | Reviewer | 28076004
    • dukenv0307 | Contributor | 28076005

Activity

  1. added
    External
    Daily
    Bug
    on Dec 19, 2023
  2. changed the title [-]Room - Error is "No results found" when re-inviting contact number without country code[/-] [+][$500] Room - Error is "No results found" when re-inviting contact number without country code[/+] on Dec 19, 2023
  3. melvin-bot commented on Dec 19, 2023

    @melvin-bot
  4. melvin-bot commented on Dec 19, 2023

    @melvin-bot

    Triggered auto assignment to @miljakljajic (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

  5. added
    Help Wanted
    on Dec 19, 2023
  6. melvin-bot commented on Dec 19, 2023

    @melvin-bot

    Bug0 Triage Checklist (Main S/O)

    • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
    • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
      • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
    • This bug is reproducible using the reproduction steps in the OP. S/O
      • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
      • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
    • This issue is filled out as thoroughly and clearly as possible
      • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
    • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync
  7. melvin-bot commented on Dec 19, 2023

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @Ollyws (External)

  8. dukenv0307 commented on Dec 19, 2023

    @dukenv0307
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    Instead of "{login} is already a member of {name}", it shows 'No results found'.

    What is the root cause of that problem?

    We're not appending the country code to the the phone number search value before comparing with excludedUsers.

    So in order to get the header message in case the number is not found, we'll compare the excludedUsers (users that are already in the room) with the searchValue here.

    The problem is that the excludedUsers logins are processed via this logic, which will append the country code to the phone number first before calling parsedPhoneNumber, this makes the parsedPhoneNumber parse correctly and the phone will end up having the country code (becomes like +60163894323).

    However the searchValue here doesn't get country code appended, so the parsePhoneNumber inside addSMSDomainIfPhoneNumber will fail to parse it, leading to the phone stay as is (0163894323). When we compare the phone with country code and the phone without country code, they are not equal (although they are the same phone number), leading to No results found showing if we try to find via phone number without country code.

    What changes do you think we should make in order to solve the problem?

    Append the country code to the the phone number search value before comparing with excludedUsers.

    We can use LoginUtils.appendCountryCode for login here (this is exactly how we processed the phone in the member invite options here and in various other places like here).

    We can optionally call Str.removeSMSDomain on the login as well.

    What alternative solutions did you explore? (Optional)

    The workspace invite page seems to have the same issue and can be fixed using the same approach.

    We can optionally pass another param to addSMSDomainIfPhoneNumber to control if we want to append the country code to the login or not, but I think we don't need to since the country code appending logic is more robust.

  9. miljakljajic commented on Dec 22, 2023

    @miljakljajic
    Contributor

    @Ollyws - what are your thoughts on @dukenv0307 's proposal?

  10. 27 remaining items

  11. added
    Weekly
    Awaiting Payment
    on Jan 25, 2024
  12. changed the title [-][$500] Room - Error is "No results found" when re-inviting contact number without country code[/-] [+][HOLD for payment 2024-02-01] [$500] Room - Error is "No results found" when re-inviting contact number without country code[/+] on Jan 25, 2024
  13. removed
    Reviewing
    on Jan 25, 2024
  14. melvin-bot commented on Jan 25, 2024

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  15. melvin-bot commented on Jan 25, 2024

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.31-7 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2024-02-01. 🎊

    For reference, here are some details about the assignees on this issue:

  16. melvin-bot commented on Jan 25, 2024

    @melvin-bot

    BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

    • [@Ollyws] The PR that introduced the bug has been identified. Link to the PR:
    • [@Ollyws] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
    • [@Ollyws] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
    • [@Ollyws] Determine if we should create a regression test for this bug.
    • [@Ollyws] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
    • [@miljakljajic] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  17. added
    Daily
    and removed
    Weekly
    on Jan 31, 2024
  18. miljakljajic commented on Jan 31, 2024

    @miljakljajic
    Contributor

    @Ollyws the offer upwork expires today, please accept it so I don't need to issue another one. Thanks!

  19. Ollyws commented on Jan 31, 2024

    @Ollyws
    Contributor

    Yeah apologies I will try and stop doing that in the future 😅, accepted thanks.

  20. miljakljajic commented on Feb 2, 2024

    @miljakljajic
    Contributor

    Lovely, thanks for your work guys! Paid and contracts closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentBugDailyExternal

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions