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

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

Closed
5 of 6 tasks
kbecciv opened this issue Dec 19, 2023 · 26 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@kbecciv
Copy link

kbecciv commented Dec 19, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] 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
@kbecciv kbecciv added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Dec 19, 2023
@melvin-bot melvin-bot bot 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 Dec 19, 2023
Copy link

melvin-bot bot commented Dec 19, 2023

Job added to Upwork: https://www.upwork.com/jobs/~0180e4026b587192bb

Copy link

melvin-bot bot commented Dec 19, 2023

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Dec 19, 2023
Copy link

melvin-bot bot commented Dec 19, 2023

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

Copy link

melvin-bot bot commented Dec 19, 2023

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

@dukenv0307
Copy link
Contributor

dukenv0307 commented Dec 19, 2023

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.

@miljakljajic
Copy link
Contributor

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

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Dec 22, 2023
Copy link

melvin-bot bot commented Dec 26, 2023

@Ollyws, @miljakljajic Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

Copy link

melvin-bot bot commented Dec 26, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

Copy link

melvin-bot bot commented Dec 28, 2023

@Ollyws, @miljakljajic Huh... This is 4 days overdue. Who can take care of this?

@Ollyws
Copy link
Contributor

Ollyws commented Dec 30, 2023

@dukenv0307's proposal LGTM.
🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Dec 30, 2023

Triggered auto assignment to @roryabraham, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@melvin-bot melvin-bot bot added the Overdue label Jan 1, 2024
@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Jan 1, 2024
Copy link

melvin-bot bot commented Jan 1, 2024

📣 @Ollyws 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

Copy link

melvin-bot bot commented Jan 1, 2024

📣 @dukenv0307 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@melvin-bot melvin-bot bot removed the Overdue label Jan 1, 2024
@roryabraham
Copy link
Contributor

Thanks @dukenv0307. If you could fix the workspace invite page too that would be great!

@roryabraham
Copy link
Contributor

Separately, @kbecciv the written reproductions steps are not clear to me. Can you please:

  • review and clarify the reproduction steps in the issue description
  • check if the same problem exists on the workspace invite page, and if so expand the test steps to include that page as well

Thanks!

Copy link

melvin-bot bot commented Jan 2, 2024

@Ollyws @miljakljajic @roryabraham @dukenv0307 this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@melvin-bot melvin-bot bot added the Overdue label Jan 4, 2024
@roryabraham
Copy link
Contributor

Hey @dukenv0307, any estimate on when we can expect a PR to be ready for review? Thanks!

@melvin-bot melvin-bot bot removed the Overdue label Jan 5, 2024
@dukenv0307
Copy link
Contributor

I'm investigating, will open the PR today.

@dukenv0307
Copy link
Contributor

@Ollyws this PR is ready for review.

@kbecciv
Copy link
Author

kbecciv commented Jan 5, 2024

@roryabraham I've updated the reproduction steps, including the same issue in the workspace invite page, and added a new video for reference.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jan 25, 2024
@melvin-bot melvin-bot bot 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 Jan 25, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jan 25, 2024
Copy link

melvin-bot bot commented Jan 25, 2024

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

Copy link

melvin-bot bot commented Jan 25, 2024

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:

Copy link

melvin-bot bot commented Jan 25, 2024

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:

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Jan 31, 2024
@miljakljajic
Copy link
Contributor

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

@melvin-bot melvin-bot bot removed the Overdue label Jan 31, 2024
@Ollyws
Copy link
Contributor

Ollyws commented Jan 31, 2024

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

@miljakljajic
Copy link
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
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

5 participants