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-09-18][$250] Profile - Phone number login is displayed as @expensify.sms #48648
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: 9.0.29-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: N/A Issue reported by: Applause - Internal Team
Action Performed:
Login with phone number
Go to Account settings
Take a look at the top of the page
Expected Result:
Phone number should be displayed without suffix @expensify.sms
Actual Result:
Phone number is displayed with suffix @expensify.sms
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Note: We cannot remove @expensify.sms in useCurrentUserPersonalDetails directly because useCurrentUserPersonalDetails are used in other positions. For example, in:
the delegateEmail can be contained @expensify.sms, so if we remove the @expensify.sms from currentUserPersonalDetails.login, condition delegateEmail === currentUserPersonalDetails.login can be failed.
What alternative solutions did you explore? (Optional)
changed the title [-]Profile - Phone number login is displayed as @expensify.sms[/-][+][$250] Profile - Phone number login is displayed as @expensify.sms[/+]on Sep 9, 2024
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 - just needed to test phone numbers
Determine if we should create a regression test for this bug. Yes
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.
Regression Test Proposal
In OD, assign an account with phone number login as Copilot following this doc
In ND, login with that phone number
Go to Settings
Verify that the phone number under your user avatar (top left) does not contain @expensify.sms domain
Press the account avatar to open the account switcher
Verify that the phone number in the account switcher does not contain @expensify.sms domain
changed the title [-][$250] Profile - Phone number login is displayed as @expensify.sms[/-][+][HOLD for payment 2024-09-18][$250] Profile - Phone number login is displayed as @expensify.sms[/+]on Sep 27, 2024
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
melvin-bot commentedon Sep 5, 2024
Triggered auto assignment to @kadiealexander (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.FitseTLT commentedon Sep 5, 2024
Edited by proposal-police: This proposal was edited at 2024-09-05 14:03:16 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Phone number login is displayed as @expensify.sms
What is the root cause of that problem?
We didn't remove sms domain here
App/src/components/AccountSwitcher.tsx
Line 163 in 6760f96
What changes do you think we should make in order to solve the problem?
We need to remove sms domain
We might also need to do the same here for the display name too
App/src/components/AccountSwitcher.tsx
Line 146 in 6760f96
It might be more centralized if we remove sms domains in
useCurrentUserPersonalDetailsWhat alternative solutions did you explore? (Optional)
If we want to format phone number in addition to removing sms domain we can use
formatPhoneNumberfromuseLocalizehereApp/src/components/AccountSwitcher.tsx
Line 34 in 6760f96
Nodebrute commentedon Sep 5, 2024
Edited by proposal-police: This proposal was edited at 2024-09-05 14:09:22 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Phone number login is displayed as @expensify.sms
What is the root cause of that problem?
We are not removing the expensify here domain also we are not formatting the phone number as we do in Profile page
What changes do you think we should make in order to solve the problem?
We can use
LocalePhoneNumber.formatPhoneNumberhere. we can do something like thisNote
We use the same
LocalePhoneNumber.formatPhoneNumberinuseLocalize()so it's the same approachWhat alternative solutions did you explore? (Optional)
Or we can format phone number directly in
useCurrentUserPersonalDetails.tsFitseTLT commentedon Sep 5, 2024
Updated to add alternative approach
Nodebrute commentedon Sep 5, 2024
Proposal updated added a note
dominictb commentedon Sep 5, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
AccountSwitchercomponent, we don't remove@expensify.smsin:App/src/components/AccountSwitcher.tsx
Line 51 in 6760f96
and
App/src/components/AccountSwitcher.tsx
Line 163 in 6760f96
What changes do you think we should make in order to solve the problem?
We need to remove
@expensify.smsdomain by usingStr.removeSMSDomainin:App/src/components/AccountSwitcher.tsx
Line 51 in 6760f96
and
App/src/components/AccountSwitcher.tsx
Line 163 in 6760f96
Note: We cannot remove
@expensify.smsinuseCurrentUserPersonalDetailsdirectly becauseuseCurrentUserPersonalDetailsare used in other positions. For example, in:App/src/components/AccountSwitcher.tsx
Line 78 in 6760f96
and
App/src/components/AccountSwitcher.tsx
Line 101 in 6760f96
the
delegateEmailcan be contained@expensify.sms, so if we remove the@expensify.smsfromcurrentUserPersonalDetails.login, conditiondelegateEmail === currentUserPersonalDetails.logincan be failed.What alternative solutions did you explore? (Optional)
Result
[-]Profile - Phone number login is displayed as @expensify.sms[/-][+][$250] Profile - Phone number login is displayed as @expensify.sms[/+]melvin-bot commentedon Sep 9, 2024
Job added to Upwork: https://www.upwork.com/jobs/~021833010029599658221
15 remaining items
jjcoffee commentedon Sep 27, 2024
Regression Test Proposal
@expensify.smsdomain@expensify.smsdomainDo we agree 👍 or 👎
jjcoffee commentedon Sep 27, 2024
Oops looks like the automation failed on this one! The PR was deployed Sept 11 (see checklist), so should be (over)due for payment. cc @kadiealexander
[-][$250] Profile - Phone number login is displayed as @expensify.sms[/-][+][HOLD for payment 2024-09-18][$250] Profile - Phone number login is displayed as @expensify.sms[/+]dominictb commentedon Sep 30, 2024
@kadiealexander Good to pay.
melvin-bot commentedon Sep 30, 2024
@luacmartins, @jjcoffee, @kadiealexander, @dominictb Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
kadiealexander commentedon Oct 1, 2024
Payouts due:
Upwork job is here.
kadiealexander commentedon Oct 1, 2024
https://github.com/Expensify/Expensify/issues/432325