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-09-18][$250] Profile - Phone number login is displayed as @expensify.sms #48648

Closed
2 of 6 tasks
lanitochka17 opened this issue Sep 5, 2024 · 22 comments
Closed
2 of 6 tasks
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

@lanitochka17
Copy link

lanitochka17 commented Sep 5, 2024

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: 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
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 5, 2024
Copy link

melvin-bot bot commented 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
Copy link
Contributor

FitseTLT commented 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

{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 ?? '')}

@Nodebrute
Copy link
Contributor

Nodebrute commented 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.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

@FitseTLT
Copy link
Contributor

FitseTLT commented Sep 5, 2024

Updated to add alternative approach

@Nodebrute
Copy link
Contributor

Proposal updated added a note

@dominictb
Copy link
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

@kadiealexander kadiealexander added the External Added to denote the issue can be worked on by a contributor label Sep 9, 2024
@melvin-bot melvin-bot bot changed the title Profile - Phone number login is displayed as @expensify.sms [$250] Profile - Phone number login is displayed as @expensify.sms Sep 9, 2024
Copy link

melvin-bot bot commented Sep 9, 2024

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

@melvin-bot melvin-bot bot added Overdue Help Wanted Apply this label when an issue is open to proposals by contributors labels Sep 9, 2024
Copy link

melvin-bot bot commented Sep 9, 2024

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

@melvin-bot melvin-bot bot removed the Overdue label Sep 9, 2024
@jjcoffee
Copy link
Contributor

jjcoffee commented Sep 9, 2024

Thanks for all the proposals! I really appreciate the attention to detail in @dominictb's proposal in identifying that applying the formatting in useCurrentUserPersonalDetails would be a bad idea, as well as the two locations we need to apply the formatting to. So I'm happy to select their proposal.

We probably need to settle on whether or not the phone number should be formatted or simply stripped of the @expensify.sms, but that's a minor detail that can be sorted out on the PR. @kadiealexander Do you have any guidance here?

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Sep 9, 2024

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

@Nodebrute
Copy link
Contributor

@jjcoffee Thanks for the review. The only difference between my proposal and @dominictb's is that he included an extra place where the same fix is needed. This is a minor detail that isn't within the scope of the issue. Typically, C+ doesn’t select proposals that are very similar to previous ones with just one additional place added.

@jjcoffee
Copy link
Contributor

jjcoffee commented Sep 9, 2024

@Nodebrute No problem! As I mentioned in my review there was also a second component to the decision, namely that @dominictb was thorough enough to notice applying the formatting in useCurrentUserPersonalDetails would lead to potential regressions. I think it makes sense to choose a thorough proposal with attention to detail over ones that lack those traits; it's worth taking care over the small details even with relatively simple issues.

@Nodebrute
Copy link
Contributor

@jjcoffee Thank you for getting back to me so quickly. I would like to clarify that using useCurrentUserPersonalDetails was not included in my main proposal. Therefore, I don’t believe my proposal is incorrect.

@luacmartins
Copy link
Contributor

I agree with @jjcoffee's decision. I'm not sure if formatting the number is necessary, since the login is actually not formatted

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

melvin-bot bot commented Sep 9, 2024

📣 @jjcoffee 🎉 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 Sep 9, 2024

📣 @dominictb 🎉 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 added Weekly KSv2 and removed Daily KSv2 labels Sep 10, 2024
@jjcoffee
Copy link
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 👎

@jjcoffee
Copy link
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

@luacmartins luacmartins 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 Sep 27, 2024
@luacmartins luacmartins added Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2 and removed Reviewing Has a PR in review Weekly KSv2 labels Sep 27, 2024
@dominictb
Copy link
Contributor

@kadiealexander Good to pay.

@melvin-bot melvin-bot bot added the Overdue label Sep 30, 2024
Copy link

melvin-bot bot commented Sep 30, 2024

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

@kadiealexander
Copy link
Contributor

kadiealexander commented Oct 1, 2024

Payouts due:

Upwork job is here.

@melvin-bot melvin-bot bot removed the Overdue label Oct 1, 2024
@kadiealexander
Copy link
Contributor

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

7 participants