You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2024-02-01] [$500] Room - Error is "No results found" when re-inviting contact number without country code #33301
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
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:
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
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 loginhere (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.
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
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:
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:
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Activity
[-]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[/+]melvin-bot commentedon Dec 19, 2023
Job added to Upwork: https://www.upwork.com/jobs/~0180e4026b587192bb
melvin-bot commentedon Dec 19, 2023
Triggered auto assignment to @miljakljajic (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Dec 19, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)melvin-bot commentedon Dec 19, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @Ollyws (
External)dukenv0307 commentedon 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
excludedUserslogins are processed via this logic, which will append the country code to the phone number first before callingparsedPhoneNumber, this makes theparsedPhoneNumberparse 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
parsePhoneNumberinsideaddSMSDomainIfPhoneNumberwill 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 toNo results foundshowing 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.appendCountryCodeforloginhere (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.removeSMSDomainon 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
addSMSDomainIfPhoneNumberto 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 commentedon Dec 22, 2023
@Ollyws - what are your thoughts on @dukenv0307 's proposal?
27 remaining items
[-][$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[/+]melvin-bot commentedon Jan 25, 2024
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon 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:
melvin-bot commentedon 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:
miljakljajic commentedon Jan 31, 2024
@Ollyws the offer upwork expires today, please accept it so I don't need to issue another one. Thanks!
Ollyws commentedon Jan 31, 2024
Yeah apologies I will try and stop doing that in the future 😅, accepted thanks.
miljakljajic commentedon Feb 2, 2024
Lovely, thanks for your work guys! Paid and contracts closed.