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 2023-06-29] [$1000] Web - Connect Bank _ App Fails to Proceed with Similar Routing and Account Numbers Without Error Message #20200

Closed
1 of 6 tasks
kbecciv opened this issue Jun 5, 2023 · 34 comments
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

@kbecciv
Copy link

kbecciv commented Jun 5, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Open the app settings.
  2. Navigate to the Workspace section.
  3. Click on a workspace
  4. Click on the Travel Section
  5. Click on Connect Manually option
  6. Connect to the bank manually and add similar routing and account numbers. (I used this as an example, Routing number:-074000078, Account number:-074000078)
  7. Check the "I accept the Expensify Terms of Service" box and click on "Continue"

Expected Result:

The app should display an error message explaining why you cannot proceed to the next step after clicking on "Continue"

Actual Result:

The app doesn't allow for identical routing and account numbers to proceed to the next step, but it doesn't provide an error message to explain why.

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.27.0

Reproducible in staging?: yes

Reproducible in production?: yes

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

Notes/Photos/Videos: Any additional supporting documentation

screen-capture.57.webm
Recording.2986.mp4

Expensify/Expensify Issue URL:

Issue reported by: @tewodrosGirmaA

Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1685780270803909

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0193062cf01d9d9ba8
  • Upwork Job ID: 1665962401680740352
  • Last Price Increase: 2023-06-06
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jun 5, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 5, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jun 5, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@tjferriss
Copy link
Contributor

Reproduced.

Screen.Recording.2023-06-05.at.23.02.01.mov

@tjferriss tjferriss added the External Added to denote the issue can be worked on by a contributor label Jun 6, 2023
@melvin-bot melvin-bot bot changed the title Web - Connect Bank _ App Fails to Proceed with Similar Routing and Account Numbers Without Error Message [$1000] Web - Connect Bank _ App Fails to Proceed with Similar Routing and Account Numbers Without Error Message Jun 6, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 6, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jun 6, 2023

Current assignee @tjferriss is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented Jun 6, 2023

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jun 6, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 6, 2023

Triggered auto assignment to @aldo-expensify (External), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@tienifr
Copy link
Contributor

tienifr commented Jun 6, 2023

Proposal

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

The app doesn't allow for identical routing and account numbers to proceed to the next step, but it doesn't provide an error message to explain why.

What is the root cause of that problem?

The back-end throws error if the routing and account numbers are identical.
There're 2 problems:

  1. We're not validating the above issue in client side
  2. We're not showing proper back-end error messages in the field
    This comes from this PR that refactors the form component. The logic to trigger onValidate when preferredLocale change
componentDidUpdate(prevProps) {
        if (prevProps.preferredLocale === this.props.preferredLocale) {
            return;
        }

has been refactored to

useEffect(() => {
       onValidate(inputValues);
   }, [onValidate, inputValues]);

The onValidate is run when the Form is rendered, which will clear the form back-end errors as can be seen here

FormActions.setErrors(props.formID, null);
. So when we submit the bank account manual step, the loading is shown, and the form is rendered again, clearing the back-end errors, that's why we never see the error.

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

  1. We need to add validation here

    to check if routing and account number are the same, if yes show an error on either the routing or account number field, or both. I prefer showing on the account number field since it's the second field that will be typed on. Please note we need to compare the trimmed value of routing and account numbers.

  2. Avoid calling onValidate on first component render, if other things change like preferredLocale then it's ok to call it.

const didFirstRendered = useRef(false);
...
useEffect(() => {
        if (!didFirstRendered.current) {
            didFirstRendered.current = true;
            return;
        }

        onValidate(inputValues);        
    }, [onValidate, inputValues]);

What alternative solutions did you explore? (Optional)

  • Another way to fix 2 is to remove that onValidate call in useEffect and instead, store the translationKey of the validation messages in the state, not the translated content. For example in here
    errorFields.accountNumber = this.props.translate('bankAccount.error.accountNumber');
    , we'll store the key 'bankAccount.error.accountNumber' in errorFields, not the translated text. Then we can use useMemo to get the translated content inside Form and display it. This will be the correct refactoring of the Form error message changes when language changes logic. This way the error messages will always be in the correct language.

A side effect of this is that the back-end error might not be translated when the user changes language. We cannot translate it since BE doesn't support localize, so we can clear it like the logic before the refactor. This can be done with another useEffect that clears the back-end errors when language changes (but needs to make sure it doesn't run on first render).

@aidear3
Copy link

aidear3 commented Jun 6, 2023

I can fix this bug

@thesahindia
Copy link
Member

I will get to this in the morning. I was busy reviewing PRs.

@thesahindia
Copy link
Member

I can fix this bug

Please post a proposal using this template.

@thesahindia
Copy link
Member

thesahindia commented Jun 8, 2023

@tienifr's proposal looks good to me.

const didFirstRendered = useRef(false);

I think we should change it to isInitialRender

C+ reviewed 🎀👀🎀

cc: @aldo-expensify

@melvin-bot melvin-bot bot added the Overdue label Jun 12, 2023
@aldo-expensify
Copy link
Contributor

Thanks, assigning @tienifr

@melvin-bot melvin-bot bot removed the Overdue label Jun 12, 2023
@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Jun 12, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 12, 2023

📣 @tienifr You have been assigned to this job by @aldo-expensify!
Please apply to this job in Upwork 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 📖

@tienifr
Copy link
Contributor

tienifr commented Jun 13, 2023

The PR is ready for review!

cc @thesahindia @aldo-expensify

@aldo-expensify aldo-expensify added the Waiting for copy User facing verbiage needs polishing label Jun 16, 2023
@tjferriss
Copy link
Contributor

Looks good to me.

@melvin-bot
Copy link

melvin-bot bot commented Jun 20, 2023

Based on my calculations, the pull request did not get merged within 3 working days of assignment. Please, check out my computations here:

  • when @tienifr got assigned: 2023-06-12 19:48:45 Z
  • when the PR got merged: 2023-06-20 02:31:44 UTC
  • days elapsed: 6

On to the next one 🚀

@thesahindia
Copy link
Member

thesahindia commented Jun 22, 2023

The PR for this issue caused a regression, so the C+ payment will be $500

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Jun 22, 2023
@melvin-bot melvin-bot bot changed the title [$1000] Web - Connect Bank _ App Fails to Proceed with Similar Routing and Account Numbers Without Error Message [HOLD for payment 2023-06-29] [$1000] Web - Connect Bank _ App Fails to Proceed with Similar Routing and Account Numbers Without Error Message Jun 22, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jun 22, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 22, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jun 22, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.30-5 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-06-29. 🎊

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
  • Contributor+ that helped on the issue and/or PR

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented Jun 22, 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:

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

@tjferriss
Copy link
Contributor

Everyone has been sent an offer via Upworks. @thesahindia can you please get started on the checklist?

@tewodrosGirmaA
Copy link

Thank you @tjferriss I accepted the offer, Thank you

@melvin-bot
Copy link

melvin-bot bot commented Jun 23, 2023

📣 @tewodrosGirmaA! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  2. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  3. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@tienifr
Copy link
Contributor

tienifr commented Jun 24, 2023

@tjferriss sorry when I access the offer it says the offer has been withdrawn, could you double check?
Thanks!

@tjferriss
Copy link
Contributor

I just resent the offer here https://www.upwork.com/nx/wm/pre-hire/c/8577561/offer/25259791

@tienifr
Copy link
Contributor

tienifr commented Jun 28, 2023

@tjferriss accepted, thanks!

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jun 28, 2023
@tjferriss tjferriss removed the Bug Something is broken. Auto assigns a BugZero manager. label Jun 28, 2023
@tjferriss tjferriss removed their assignment Jun 28, 2023
@tjferriss tjferriss added the Bug Something is broken. Auto assigns a BugZero manager. label Jun 28, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 28, 2023

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

@Expensify Expensify deleted a comment from melvin-bot bot Jun 28, 2023
@tjferriss
Copy link
Contributor

@puneetlath I'm heading out on extended OOO. Can you please help with processing the payments?

@puneetlath
Copy link
Contributor

Sure thing. @thesahindia friendly bump on the checklist.

@thesahindia
Copy link
Member

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.

  1. Go to settings > Workspaces > Open a workspace
  2. Click on bank account at bottom
  3. Connect manually
  4. Use the same routing number and account number
  5. Click on "Continue" button
  6. Verify you see an error

We can skip other items from the checklist. It was not a regression. It was a case that we weren't handling at the front end.

@puneetlath
Copy link
Contributor

All paid!

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

8 participants