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 2023-11-30] [$500] Workspace-WS Invite phone number shown with prefix+91, but on members list 0 is shown #29852
Version Number: 1.3.86-1 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: @
Enter phone number 8765467895 and note search results show in bold +918765467895
Tap next
Tap invite
Expected Result:
In workspace members page, the member added is shown in bold as 08765467895 but while invite it was shown with prefix +918765467895. In both place in same format in a consistent manner phone number should be displayed with same prefix.
Actual Result:
In workspace members page, the member added is shown in bold as 08765467895 but while invite it was shown with prefix +918765467895.The behaviour is inconsistent.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
changed the title [-]Workspace-WS Invite phone number shown with prefix+91, but on members list 0 is shown[/-][+][$500] Workspace-WS Invite phone number shown with prefix+91, but on members list 0 is shown[/+]on Oct 18, 2023
As far as I see we include code like +91 in login and then strip it in text or alternate text or when we display. So I think we should not strip the value directly from search value because we want the +91 to be included in login
So we can change the text to
With this the option itself is created with text and alternate text stripped of code and the formatting in the primary solution and alternative solution 1 will not be necessary.
Please re-state the problem that we are trying to solve in this issue.
Phone number formats inconsistent between search result list and the member list.
What is the root cause of that problem?
The search value is formatted so that it will use the e164 format whenever possible, while the member lists use different approach where it eliminates the unnecessary country code when the region code is similar to the country code by IP:
What changes do you think we should make in order to solve the problem?
We need to decide which format is expected. If the member list should follow the search result, then I propose that we update the formatPhoneNumber so that is returns the e164 format:
changed the title [-][$500] Workspace-WS Invite phone number shown with prefix+91, but on members list 0 is shown[/-][+][HOLD for payment 2023-11-30] [$500] Workspace-WS Invite phone number shown with prefix+91, but on members list 0 is shown[/+]on Nov 23, 2023
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.2-3 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 2023-11-30. 🎊
After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
External issue reporter
Contributor that fixed the issue — @c3024 paid $500 via Upwork
Contributor+ that helped on the issue and/or PR — @Ollyws paid $500 via Upwork
For reference, here are some details about the assignees on 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 / @c3024] The PR that introduced the bug has been identified. Link to the PR:
[@Ollyws / @c3024] 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 / @c3024] 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 / @c3024] Determine if we should create a regression test for this bug.
[@Ollyws / @c3024] 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.
[@CortneyOfstad] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
The PR that introduced the bug has been identified. Link to the PR:
This wasn't a regression from any PR, we've just never used formatted the phone numbers for this item in the options list.
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:
N/A
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:
N/A
Determine if we should create a regression test for this bug.
I don't think a regression test is necessary as this is a minor aesthetic issue that doesn't affect the flow in any significant way.
Activity
melvin-bot commentedon Oct 18, 2023
Triggered auto assignment to @CortneyOfstad (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.[-]Workspace-WS Invite phone number shown with prefix+91, but on members list 0 is shown[/-][+][$500] Workspace-WS Invite phone number shown with prefix+91, but on members list 0 is shown[/+]melvin-bot commentedon Oct 18, 2023
Job added to Upwork: https://www.upwork.com/jobs/~0169e8308b7b2db2a8
melvin-bot commentedon Oct 18, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)melvin-bot commentedon Oct 18, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @Ollyws (
External)c3024 commentedon Oct 18, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Number in invite page shows country code like +91 instead of 0
What is the root cause of that problem?
For an unselected user to invite we are formatting the details here
App/src/pages/workspace/WorkspaceInvitePage.js
Line 171 in e8cb124
and that function here
App/src/libs/OptionsListUtils.js
Line 1457 in e8cb124
we are not formatiing the phone number with LocalePhoneNumber.formatPhoneNumber.
What changes do you think we should make in order to solve the problem?
We should change the above to
What alternative solutions did you explore? (Optional)
Solution 1:
We can instead format where login or searchValue is copied to text here
App/src/libs/OptionsListUtils.js
Lines 1224 to 1225 in e8cb124
As far as I see we include code like +91 in login and then strip it in text or alternate text or when we display. So I think we should not strip the value directly from search value because we want the +91 to be included in login
So we can change the text to
Solution 2:
We see that the alternateText does not have the code appended even though we use similar code here
App/src/libs/OptionsListUtils.js
Lines 1225 to 1226 in e8cb124
this is because we are formatting using personal detail here when the option is not a report but a personal detail for alternate text here
App/src/libs/OptionsListUtils.js
Line 523 in e8cb124
We can do the same here
App/src/libs/OptionsListUtils.js
Line 535 in e8cb124
for text as well by changing it to
With this the option itself is created with text and alternate text stripped of code and the formatting in the primary solution and alternative solution 1 will not be necessary.
zukilover commentedon Oct 18, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Phone number formats inconsistent between search result list and the member list.
What is the root cause of that problem?
The search value is formatted so that it will use the
e164format whenever possible, while the member lists use different approach where it eliminates the unnecessary country code when the region code is similar to the country code by IP:Search list:
App/src/libs/OptionsListUtils.js
Lines 1019 to 1020 in e8cb124
Member list:
App/src/libs/LocalePhoneNumber.ts
Lines 34 to 36 in e8cb124
What changes do you think we should make in order to solve the problem?
We need to decide which format is expected. If the member list should follow the search result, then I propose that we update the
formatPhoneNumberso that is returns the e164 format:As the text and alternateText are handled by
WorkspaceMembersPage:App/src/pages/workspace/WorkspaceMembersPage.js
Lines 353 to 354 in a24e6a0
This results in the alternate text consistently formatted as the search value:

What alternative solutions did you explore? (Optional)
If the search result should follow the rules for the member list, then we can utilize the same
formatPhoneNumberto format the search value, e.g.:But this results in the formatter number being sent to the
AddMembersToWorkspacewhich I think is unexpected.CortneyOfstad commentedon Oct 18, 2023
I am heading OoO until Oct. 25, so reapplying the BZ label to have someone keep an eye on this while I am gone 👍
39 remaining items
[-][$500] Workspace-WS Invite phone number shown with prefix+91, but on members list 0 is shown[/-][+][HOLD for payment 2023-11-30] [$500] Workspace-WS Invite phone number shown with prefix+91, but on members list 0 is shown[/+]melvin-bot commentedon Nov 23, 2023
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Nov 23, 2023
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.2-3 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 2023-11-30. 🎊
After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Nov 23, 2023
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 commentedon Nov 30, 2023
BugZero Checklist:
This wasn't a regression from any PR, we've just never used formatted the phone numbers for this item in the options list.
N/A
N/A
I don't think a regression test is necessary as this is a minor aesthetic issue that doesn't affect the flow in any significant way.
CortneyOfstad commentedon Dec 1, 2023
@Ollyws @c3024 — both have been paid in Upwork and no regression test is needed, so closing! Thanks all!