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-04-04] Workspace -Unable to add Chase bank account, can't choose a bank account ending in 1111/0000 #16594

Closed
6 tasks done
kbecciv opened this issue Mar 27, 2023 · 13 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production DeployBlockerCash This issue or pull request should block deployment Engineering Weekly KSv2

Comments

@kbecciv
Copy link

kbecciv commented Mar 27, 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. Go to URL https://staging.new.expensify.com/
  2. Login with any account
  3. Go to Settings -> Workspaces -> Open any WS -> Connect bank account -> Connect online with Plaid
  4. On the bank account list select "Chase"
  5. Enter the credentials "user_good / pass_good" in "First Platypus Bank"
  6. Select mobile and enter "credentials_good" as the verification mode
  7. Checkmark the "Plaid Checking" and "Plaid Saving"
  8. Checkmark the 2 options under "additional information you want to share" -> Click on continue
  9. Click "Connect account information"
  10. Click on the last confirmation on the plaid modal
  11. Select the bank account ending in 1111

Expected Result:

Unable to add Chase bank account, can't choose a bank account ending in 1111/0000

Actual Result:

The bank account ending in 1111 was selected and Chase bank account added successfully

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.2.90.6

Reproducible in staging?: Yes

Reproducible in production?: Unable to verify

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

Bug5995087_Recording__4041.mp4

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal Team

Slack conversation:

View all open jobs on GitHub

@kbecciv kbecciv added the DeployBlockerCash This issue or pull request should block deployment label Mar 27, 2023
@OSBotify
Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open StagingDeployCash deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@MelvinBot
Copy link

Everybody was OOO, so I assigned 10 random eligible people.

@kbecciv
Copy link
Author

kbecciv commented Mar 27, 2023

Putting Deploy Deploy blocker label because QA team is unable to verify this issue in Production, it worked on last Regression on Saturday.

@fedirjh
Copy link
Contributor

fedirjh commented Mar 28, 2023

This is a regression from 204ded3

Explanation

In AddPlaidBankAccount we save the selectedPlaidAccountID in reimbursementAccountDraft an then we use it to select the account from the list , However the changes made in #15772 caused getDefaultStateForField to no longer rely on draftValues. So the selectedPlaidAccountID fallback to '' making it impossible to highlight the selected account.

onSelect={(plaidAccountID) => {
ReimbursementAccount.updateReimbursementAccountDraft({plaidAccountID});
}}

Solution

To address this issue, we can retrieve the draft value directly from the AddPlaidBankAccount component by replacing the following line:

const selectedPlaidAccountID = this.props.getDefaultStateForField('plaidAccountID', '');

With

const selectedPlaidAccountID = lodashGet(this.props.reimbursementAccountDraft, 'plaidAccountID', '');

@mollfpr
Copy link
Contributor

mollfpr commented Mar 28, 2023

Thanks @fedirjh!

@tienifr Could you also check if any others form that impact by removing reimbursementAccountDraft from getDefaultStateForField function?

@tienifr
Copy link
Contributor

tienifr commented Mar 28, 2023

Thank @fedirjh @mollfpr The problem is because of Picker. Why other places that use reimbursementAccountDraft work well? Because the TextInput, CheckboxWithLabel, ... has defaultValue and shouldSaveDraft, so in Form.js we have the logic to update the value base on defaultValue or draftValue. But in https://github.com/Expensify/App/blob/0763be562293a1b9e3782eaeee0843a7f805e38d/src/components/Picker/Picker.js we don't use shouldSaveDraft and defaultValue. Please correct me if I'm wrong.
I have some problem when perform this issue on dev. Do you know how to do it?

@joelbettner
Copy link
Contributor

Unassigning myself from this as I got assigned another hourly at the same time.

@joelbettner joelbettner removed their assignment Mar 28, 2023
@luacmartins
Copy link
Contributor

@tienifr what issues are you seeing on dev?

@luacmartins
Copy link
Contributor

@fedirjh that solution doesn't seem to be enough. I see the following error when selecting the account and submitting it:

Screenshot 2023-03-28 at 11 34 52 AM

@luacmartins luacmartins mentioned this issue Mar 28, 2023
55 tasks
@melvin-bot melvin-bot bot added the Reviewing Has a PR in review label Mar 28, 2023
@MariaHCD
Copy link
Contributor

Looks like this was caused because of the change to getDefaultStateForField in this PR: https://github.com/Expensify/App/pull/15772/files#diff-151644ad98569c9b8b94994ae6549398c346616bcae7dc25d98a46d3f532b41eL128

@luacmartins
Copy link
Contributor

Fix is being deployed to staging. Closing this issue. Thanks everyone!

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Hourly KSv2 labels Mar 28, 2023
@melvin-bot melvin-bot bot changed the title Workspace -Unable to add Chase bank account, can't choose a bank account ending in 1111/0000 [HOLD for payment 2023-04-04] Workspace -Unable to add Chase bank account, can't choose a bank account ending in 1111/0000 Mar 28, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Mar 28, 2023
@MelvinBot
Copy link

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

@MelvinBot
Copy link

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.2.90-7 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-04-04. 🎊

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

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 DeployBlockerCash This issue or pull request should block deployment Engineering Weekly KSv2
Projects
None yet
Development

No branches or pull requests