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-03-25] [$500] Bank account – Able to save a phone number with some spaces before and without + #36072

Closed
1 of 6 tasks
lanitochka17 opened this issue Feb 7, 2024 · 38 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Feb 7, 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: 1.4.38-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: https://expensify.testrail.io/index.php?/tests/view/4289031
Email or phone of affected tester (no customers): [email protected]
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:

Action Performed:

  1. Open New Expensify app.
  2. Log in with a applause.expensifail account (that does not have any bank account already added)
  3. Navigate to the add bank account modal
  4. Select the Manual method to add a bank account
  5. On the "Connect Bank Account" page, enter the routing and account numbers
  6. Checkmark the "I accept the Expensify Terms of Service"
  7. In the company information
  8. Fill out the company information
  9. Fill out the phone number information with some spaces before and without +
  10. Click Save and continue

Expected Result:

You’re shown an error on the incorporation date field

Actual Result:

Able to save a phone number with some spaces before and without +

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

Bug6370867_1707336524023.BA.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~019136df945e25456b
  • Upwork Job ID: 1755331054635565056
  • Last Price Increase: 2024-02-14
  • Automatic offers:
    • cubuspl42 | Reviewer | 0
@lanitochka17 lanitochka17 added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Feb 7, 2024
@melvin-bot melvin-bot bot changed the title Bank account – Able to save a phone number with some spaces before and without + [$500] Bank account – Able to save a phone number with some spaces before and without + Feb 7, 2024
Copy link

melvin-bot bot commented Feb 7, 2024

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 7, 2024
Copy link

melvin-bot bot commented Feb 7, 2024

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

Copy link

melvin-bot bot commented Feb 7, 2024

Triggered auto assignment to @johncschuster (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@ghost
Copy link

ghost commented Feb 7, 2024

How to make applause.expensifail account for new contributors?

@FitseTLT
Copy link
Contributor

FitseTLT commented Feb 7, 2024

This is intentional. It presumes that the phone is US phone so it works without giving it the country code.

@allgandalf
Copy link
Contributor

Input without country code is alright, it is handled in the validation function but we need to fix the extra white spaces issue

Proposal

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

Able to save a phone number with some spaces before

What is the root cause of that problem?

In isValidUSPhone , we do not check if there are white spaces in the input

function isValidUSPhone(phoneNumber = '', isCountryCodeOptional?: boolean): boolean {

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

have a condition in isValidUSPhone function such that if there are any white spaces at the starting or ending of the phone number then return false:

// Check for extra spaces
    if (phoneNumber !== phoneNumber.trim()) {
        return false; // Extra spaces found, return false
    }

This will display error message to enter valid phone number

What alternative solutions did you explore? (Optional)

N/A

@melvin-bot melvin-bot bot added the Overdue label Feb 12, 2024
Copy link

melvin-bot bot commented Feb 13, 2024

@cubuspl42, @johncschuster Huh... This is 4 days overdue. Who can take care of this?

@cubuspl42
Copy link
Contributor

cubuspl42 commented Feb 14, 2024

@GandalfGwaihir How does your solution improve the UX? Does it change some glitch for a form validation error, or does the old code just trim the extra whitespace without any user-observable issues?

@melvin-bot melvin-bot bot removed the Overdue label Feb 14, 2024
@allgandalf
Copy link
Contributor

allgandalf commented Feb 14, 2024

@cubuspl42 , yes my solution does improve the UX.

Currently we allow the inputs with whitespaces like 997567 , but this shouldn’t be allowed as we need to store the values in form 997567, this is a phone number so proper formated values need to be sent to the backend :)

Does it change some glitch for a form validation error

yes we currently miss this validation error i.e. we don’t return false for is valid phone number when we have whitespaces in the input ,

The old code doesn’t do any such type of validation , it simply passed the input value to
isValidUSPhone

@cubuspl42
Copy link
Contributor

The issue (or the proposal) don't show any evidence of how a number like 997567 is actually presented to the user (as opposed as just being accepted during input). Could you provide some before/after screenshots?

Copy link

melvin-bot bot commented Feb 14, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@allgandalf
Copy link
Contributor

allgandalf commented Feb 14, 2024

Hey @cubuspl42 , The Bank account setup was upgraded to new UI and they have removed the Phone number field it seems, you can close this issue for good :)

Please wait for updated comments;

EDIT:
We send the untrimmed value to the BE as we include whitespaces in the input, so answering your question: Yes this my solution does fix the bug in form validation as it will give error to the input in phone number where we have whitespaces either at the beginning or at the end of the input :)

WhatsApp.Video.2024-02-15.at.10.09.35.PM.mp4

Expected Result:
You’re shown an error on the incorporation date field

From the issue description they expect that we should not allow any spaces when saving a phone number, currently we allow it, but this should not be allowed according to the expected results of this bug

@allgandalf
Copy link
Contributor

hello @cubuspl42 , please refer to my new comments above

@cubuspl42
Copy link
Contributor

In such a case, I disagree that we should raise an error. We should silently trim the number. It could be copy-pasted from a source, which adds the extra whitespace. It's possibly not the user's fault.

@allgandalf
Copy link
Contributor

allgandalf commented Feb 16, 2024

Well if that is the case then we can go that way too, :) no worries

We would then send trimmed inputs to the validation function

@cubuspl42
Copy link
Contributor

What are the up-to-date reproduction steps? Is there a way to get to this point without going through Onfido flow?

@allgandalf
Copy link
Contributor

allgandalf commented Feb 16, 2024

We need to start connecting the bank account manually, then at the summary page as seen in the video i had attached, we can reproduce this bug

Is there a way to get to this point without going through Onfido flow?

Not really we have to follow the Onfido flow

@melvin-bot melvin-bot bot added the Overdue label Feb 19, 2024
@cubuspl42
Copy link
Contributor

It was tough, but I reproduced the issue, skipping the Onfido flow. See this Slack thread.

I confirm that we present the whitespace-containing telephone number to the user in the confirmation step.

It's a minor thing, but it is a bug indeed.

I approve the proposal by @GandalfGwaihir

C+ reviewed 🎀 👀 🎀

@melvin-bot melvin-bot bot removed the Overdue label Feb 19, 2024
Copy link

melvin-bot bot commented Feb 19, 2024

📣 @GandalfGwaihir You have been assigned to this job!
Please apply to the Upwork job and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Once you apply to this job, your Upwork ID will be stored and you will be automatically hired for future jobs!
Keep in mind: Code of Conduct | Contributing 📖

@allgandalf
Copy link
Contributor

PR will be ready by Wednesday :)

@allgandalf
Copy link
Contributor

PR up for review @cubuspl42 :)

@melvin-bot melvin-bot bot added Monthly KSv2 and removed Weekly KSv2 labels Mar 15, 2024
Copy link

melvin-bot bot commented Mar 15, 2024

This issue has not been updated in over 15 days. @nkuoch, @cubuspl42, @johncschuster, @GandalfGwaihir eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

@cubuspl42
Copy link
Contributor

PR is merged

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Monthly KSv2 labels Mar 18, 2024
@melvin-bot melvin-bot bot changed the title [$500] Bank account – Able to save a phone number with some spaces before and without + [HOLD for payment 2024-03-25] [$500] Bank account – Able to save a phone number with some spaces before and without + Mar 18, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Mar 18, 2024
Copy link

melvin-bot bot commented Mar 18, 2024

Reviewing label has been removed, please complete the "BugZero Checklist".

Copy link

melvin-bot bot commented Mar 18, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.53-2 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-03-25. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Mar 18, 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:

  • [@cubuspl42] The PR that introduced the bug has been identified. Link to the PR:
  • [@cubuspl42] 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:
  • [@cubuspl42] 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:
  • [@cubuspl42] Determine if we should create a regression test for this bug.
  • [@cubuspl42] 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.
  • [@johncschuster] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@johncschuster
Copy link
Contributor

Bumping to keep Melvin happy. I will issue payment on March 25 👍

@allgandalf
Copy link
Contributor

friendly bump @johncschuster for payment :)

@cubuspl42
Copy link
Contributor

  • The PR that introduced the bug has been identified. Link to the PR:
    • This never worked as expected
  • 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:
    • No need for additional discussion
  • Determine if we should create a regression test for this bug.
    • No
  • 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.
    • N/A

@allgandalf
Copy link
Contributor

Actually, via upwork @johncschuster

@allgandalf
Copy link
Contributor

hello @johncschuster , this actually needs to be paid via upwork to me, can you update the payment summary ? thanks

@cubuspl42
Copy link
Contributor

This was likely a mistake, so let's wait patiently for John's response for one or two business days, then you can create a thread on Slack (feel free to ping me too in such a case).

@johncschuster
Copy link
Contributor

@GandalfGwaihir can you share the link to your Upwork profile? I'm having a hard time finding you in Upwork.

@johncschuster
Copy link
Contributor

Thank you! Your offer is here!

@allgandalf
Copy link
Contributor

Accepted the offer :)thanks a lot

@johncschuster
Copy link
Contributor

Payment has been issued! 🎉

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. External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
None yet
Development

No branches or pull requests

6 participants