Skip to content

[HOLD for payment 2024-09-18][$250] Profile - Phone number login is displayed as @expensify.sms #48648

Closed

Description

@lanitochka17

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: 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:

  1. Login with phone number
  2. Go to Account settings
  3. 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?

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

Screenshots/Videos

Add any screenshot/video evidence

sms

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021833010029599658221
  • Upwork Job ID: 1833010029599658221
  • Last Price Increase: 2024-09-09
  • Automatic offers:
    • jjcoffee | Reviewer | 103887462
    • dominictb | Contributor | 103887465
Issue OwnerCurrent Issue Owner: @kadiealexander

Activity

  1. added
    Daily
    Bug
    on Sep 5, 2024
  2. melvin-bot commented on Sep 5, 2024

    @melvin-bot

    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.

  3. FitseTLT commented on Sep 5, 2024

    @FitseTLT
    Contributor

    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

    {currentUserPersonalDetails?.login}

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

    We need to remove sms domain

                                {Str.removeSMSDomain(currentUserPersonalDetails?.login ?? '')}
    
    

    We might also need to do the same here for the display name too

    {currentUserPersonalDetails?.displayName}

    It might be more centralized if we remove sms domains in useCurrentUserPersonalDetails

    
        const login = accountPersonalDetails?.login;
        const currentUserPersonalDetails: PersonalDetails = useMemo(
            () => ({...accountPersonalDetails, ...(login && {login: Str.removeSMSDomain(login ?? '')}), accountID}),
    

    What alternative solutions did you explore? (Optional)

    If we want to format phone number in addition to removing sms domain we can use formatPhoneNumber from useLocalize here

    const {translate} = useLocalize();

        const {translate, formatPhoneNumber} = useLocalize();
    
    
                                {formatPhoneNumber(currentUserPersonalDetails?.login ?? '')}
    
    
  4. Nodebrute commented on Sep 5, 2024

    @Nodebrute
    Contributor

    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.formatPhoneNumber here. we can do something like this

     { LocalePhoneNumber.formatPhoneNumber(currentUserPersonalDetails?.login ?? '')}
    

    Note

    We use the same LocalePhoneNumber.formatPhoneNumber in useLocalize() so it's the same approach

    What alternative solutions did you explore? (Optional)

    Or we can format phone number directly in useCurrentUserPersonalDetails.ts

  5. FitseTLT commented on Sep 5, 2024

    @FitseTLT
    Contributor

    Updated to add alternative approach

  6. Nodebrute commented on Sep 5, 2024

    @Nodebrute
    Contributor

    Proposal updated added a note

  7. dominictb commented on Sep 5, 2024

    @dominictb
    Contributor

    Proposal

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

    • Phone number is displayed with suffix @expensify.sms

    What is the root cause of that problem?

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

    What alternative solutions did you explore? (Optional)

    Result

    image

  8. added
    External
    on Sep 9, 2024
  9. 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
  10. melvin-bot commented on Sep 9, 2024

    @melvin-bot
  11. added
    Help Wanted
    on Sep 9, 2024
  12. 15 remaining items

  13. jjcoffee commented on Sep 27, 2024

    @jjcoffee
    Contributor
    • The PR that introduced the bug has been identified. Link to the PR: Delegate access: Add account switcher #47338
    • 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: https://github.com/Expensify/App/pull/47338/files#r1778216717
    • 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

    1. In OD, assign an account with phone number login as Copilot following this doc
    2. In ND, login with that phone number
    3. Go to Settings
    4. Verify that the phone number under your user avatar (top left) does not contain @expensify.sms domain
    5. Press the account avatar to open the account switcher
    6. Verify that the phone number in the account switcher does not contain @expensify.sms domain

    Do we agree 👍 or 👎

  14. jjcoffee commented on Sep 27, 2024

    @jjcoffee
    Contributor

    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

  15. 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
  16. added
    Awaiting Payment
    Daily
    and removed
    Reviewing
    Weekly
    on Sep 27, 2024
  17. dominictb commented on Sep 30, 2024

    @dominictb
    Contributor

    @kadiealexander Good to pay.

  18. melvin-bot commented on Sep 30, 2024

    @melvin-bot

    @luacmartins, @jjcoffee, @kadiealexander, @dominictb Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  19. kadiealexander commented on Oct 1, 2024

    @kadiealexander
    Contributor

    Payouts due:

    Upwork job is here.

  20. kadiealexander commented on Oct 1, 2024

    @kadiealexander
    Contributor
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