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-07] [$500] Bank account - Selected bank account is not checked in bank account selection step #37290

Closed
6 tasks done
kbecciv opened this issue Feb 27, 2024 · 27 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@kbecciv
Copy link

kbecciv commented Feb 27, 2024

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: v1.4.44-0
Reproducible in staging?: y
Reproducible in production?: n
Issue reported by: Applause - Internal team

Action Performed:

  1. Go to staging.new.expensify.com.
  2. Go to workspace settings.
  3. Select a workspace.
  4. Go to Bank account.
  5. Click Connect online with Paid.
  6. Log in with Chase account.
  7. Back in bank account selection page, select any bank account.

Expected Result:

The selected bank account is checked in the checkbox.

Actual Result:

The selected bank account is not checked in the checkbox.
This issue also occurs with the checkbox in Company owner steps.

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

Bug6393828_1709031318790.20240227_074738.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01f67808490772984d
  • Upwork Job ID: 1762476893193760768
  • Last Price Increase: 2024-02-27
  • Automatic offers:
    • jjcoffee | Reviewer | 0
    • ZhenjaHorbach | Contributor | 0
@kbecciv kbecciv added DeployBlockerCash This issue or pull request should block deployment External Added to denote the issue can be worked on by a contributor labels Feb 27, 2024
@melvin-bot melvin-bot bot changed the title Bank account - Selected bank account is not checked in bank account selection step [$500] Bank account - Selected bank account is not checked in bank account selection step Feb 27, 2024
Copy link

melvin-bot bot commented Feb 27, 2024

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

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

melvin-bot bot commented Feb 27, 2024

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

@melvin-bot melvin-bot bot added the Daily KSv2 label Feb 27, 2024
@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Feb 27, 2024
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.

Copy link

melvin-bot bot commented Feb 27, 2024

Triggered auto assignment to @flodnv (Engineering), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

@kbecciv
Copy link
Author

kbecciv commented Feb 27, 2024

We think that this bug might be related to #vip-bills
CC @davidcardoza

@eucool
Copy link
Contributor

eucool commented Feb 27, 2024

Proposal

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

Selected bank account is not checked in bank account selection step

What is the root cause of that problem?

We forget to pass isChecked prop:

isChecked={item.value === checkedValue}

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

Pass isChecked prop below:

<Text style={[styles.textLabelSupporting]}>{`${translate('bankAccount.chooseAnAccountBelow')}:`}</Text>
<RadioButtons
items={options}
defaultCheckedValue={defaultSelectedPlaidAccountID}
onPress={handleSelectingPlaidAccount}
radioButtonStyle={[styles.mb6]}
/>

What alternative solutions did you explore? (Optional)

N/A

@flodnv
Copy link
Contributor

flodnv commented Feb 27, 2024

Probably good, do you agree with the fix @jjcoffee @roryabraham @danieldoglas ?

@danieldoglas
Copy link
Contributor

That sounds good to me as well, I noticed that happening on #37271 as well, but the error logged is different there.

@ZhenjaHorbach
Copy link
Contributor

ZhenjaHorbach commented Feb 27, 2024

Actually problem related with this PR
#34925

Proposal

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

Bank account - Selected bank account is not checked in bank account selection step

What is the root cause of that problem?

Since we added useEffect in this PR
#34925

useEffect(() => {
if (value === checkedValue) {
return;
}
setCheckedValue(value ?? '');
}, [checkedValue, value]);

but don't pass value for RadioButtons like prop

As result every time when we change checkedValue we set checkedValue as empty line

Because for all cases value(undefined) is not equal checkedValue

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

To fix this issue we can don't change checkedValue inside useEffect if value is undefined

useEffect(() => {
if (value === checkedValue) {
return;
}
setCheckedValue(value ?? '');
}, [checkedValue, value]);

And as additional information
Probably we are expected to pass value inside AddPlaidBankAccount using selectedPlaidAccountID

selectedPlaidAccountID,

<RadioButtons
items={options}
defaultCheckedValue={defaultSelectedPlaidAccountID}
onPress={handleSelectingPlaidAccount}
radioButtonStyle={[styles.mb6]}
/>

What alternative solutions did you explore? (Optional)

As alternative, we can add value like prop for all places where we use RadioButtons

Screenshot 2024-02-27 at 15 30 26

Plus I think we need refactor this component and don't use defaultCheckedValue
Because defaultCheckedValue and value needed for change current state from parent component

And to me it looks like duplication of props

@danieldoglas
Copy link
Contributor

@ZhenjaHorbach hmm thanks for checking that.

Yeah, thanks for pointing out that pull request.

I think checking if the value exists makes sense since most of the forms are not using value outside of the form like it's the case with the exit survey and that property was just implemented. @roryabraham @mollfpr what do you think?

@jjcoffee
Copy link
Contributor

@ZhenjaHorbach's proposal LGTM and makes sense that it comes from #34925 given this is only happening on staging. Also agree that checking if value is undefined makes sense here as value is an optional prop that's meant to only be used if using the component as a controlled input (i.e. it should work as expected without it!).

/** The checked value, if you're using this component as a controlled input. */
value?: string;

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Feb 27, 2024

Current assignee @flodnv is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

@flodnv
Copy link
Contributor

flodnv commented Feb 27, 2024

Leaving this to you @roryabraham since you originally wrote the code

@roryabraham
Copy link
Contributor

whoops, my mistake. I made RadioButtons a controlled component without refactoring other usages to be controlled. I like @ZhenjaHorbach's proposal to make it work as controlled or uncontrolled, but I think that we can leave defaultCheckedValue as it still has a utility for parent components using RadioButtons as an uncontrolled component

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

melvin-bot bot commented Feb 27, 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 Feb 27, 2024

📣 @ZhenjaHorbach 🎉 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 📖

@roryabraham
Copy link
Contributor

btw @ZhenjaHorbach, are you in the #expensify-open-source slack room?

@ZhenjaHorbach
Copy link
Contributor

btw @ZhenjaHorbach, are you in the #expensify-open-source slack room?

Yeah, sure )

@roryabraham
Copy link
Contributor

what's your Slack handle?

@ZhenjaHorbach
Copy link
Contributor

📣 @ZhenjaHorbach 🎉 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 📖

Pr will be ready today

@ZhenjaHorbach
Copy link
Contributor

what's your Slack handle?

HorbachY

Copy link

melvin-bot bot commented Feb 27, 2024

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@puneetlath puneetlath removed the DeployBlockerCash This issue or pull request should block deployment label Feb 28, 2024
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Feb 29, 2024
@melvin-bot melvin-bot bot changed the title [$500] Bank account - Selected bank account is not checked in bank account selection step [HOLD for payment 2024-03-07] [$500] Bank account - Selected bank account is not checked in bank account selection step Feb 29, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Feb 29, 2024
Copy link

melvin-bot bot commented Feb 29, 2024

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

Copy link

melvin-bot bot commented Feb 29, 2024

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

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

@jjcoffee
Copy link
Contributor

jjcoffee commented Mar 7, 2024

  • The PR that introduced the bug has been identified. Link to the PR: Mandatory exit survey for users going back to OldDot #34925
  • 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/34925/files#r1515894840
  • 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
  • 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. Go to workspace settings
  2. Select a workspace
  3. Go to Bank account
  4. Click Connect online with Paid
  5. Log in with Chase test account details
  6. Back in bank account selection page, select any bank account
  7. Verify that selected bank account is checked in the checkbox

Do we agree 👍 or 👎

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Mar 7, 2024
Copy link

melvin-bot bot commented Mar 7, 2024

Issue is ready for payment but no BZ is assigned. @Christinadobrzyn you are the lucky winner! Please verify the payment summary looks correct and complete the checklist. Thanks!

@Christinadobrzyn
Copy link
Contributor

Payouts due:

Contributor: $500 @ZhenjaHorbach (paid in Upwork - https://www.upwork.com/nx/wm/workroom/36490106/overview)
Contributor+: $500 @jjcoffee (paid in Upwork - https://www.upwork.com/nx/wm/workroom/36497814/overview

Upwork job is here.

Regression test here - https://github.com/Expensify/Expensify/issues/376594

closing

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

No branches or pull requests

9 participants