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

[$500] Bank Account - Beneficial owner form isn't displayed after filling it, exit the BA set up and return #31848

Closed
2 of 6 tasks
kbecciv opened this issue Nov 24, 2023 · 27 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Monthly KSv2 Reviewing Has a PR in review

Comments

@kbecciv
Copy link

kbecciv commented Nov 24, 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!


Version Number: 1.4.3.2
Reproducible in staging?: y
Reproducible in production?: unable to check VBA in production
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
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:

Action Performed:

Pre-requisite: user must have initiated the process to add a BA and reach the Beneficial owner page.

  1. Toggle the box to add a beneficial owner.
  2. Fill out the form.
  3. Exit the BA modal, go to LHN.
  4. Go back to the BA modal and the beneficial owner page.

Expected Result:

Additional beneficial owner form should be displayed.

Actual Result:

Additional beneficial owner form is not displayed.

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

Bug6288995_1700777107719.Yjkr6643_1_.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~013b94c3bd60aca7e1
  • Upwork Job ID: 1729116399924043776
  • Last Price Increase: 2023-11-27
  • Automatic offers:
    • cubuspl42 | Reviewer | 27898874
    • bernhardoj | Contributor | 27898876
@kbecciv kbecciv added the DeployBlockerCash This issue or pull request should block deployment label Nov 24, 2023
Copy link

melvin-bot bot commented Nov 24, 2023

Triggered auto assignment to @Li357 (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@melvin-bot melvin-bot bot added the Overdue label Nov 27, 2023
@mountiny mountiny 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. and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Nov 27, 2023
@melvin-bot melvin-bot bot removed the Overdue label Nov 27, 2023
@melvin-bot melvin-bot bot changed the title Bank Account - Beneficial owner form isn't displayed after filling it, exit the BA set up and return [$500] Bank Account - Beneficial owner form isn't displayed after filling it, exit the BA set up and return Nov 27, 2023
Copy link

melvin-bot bot commented Nov 27, 2023

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

Copy link

melvin-bot bot commented Nov 27, 2023

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

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

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

Copy link

melvin-bot bot commented Nov 27, 2023

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

@mountiny
Copy link
Contributor

This does not seem like a blocker to me, but we should definitely investigate what caused this issue and fix it

@bernhardoj
Copy link
Contributor

Proposal

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

The beneficial owners form doesn't show if we close and reopen the bank account page.

What is the root cause of that problem?

This is another regression from Form provider refactor.

In beneficial owners page, we show the form if hasOtherBeneficialOwners from inputValues is true.

{Boolean(inputValues.hasOtherBeneficialOwners) && (

<FormProvider
formID={ONYXKEYS.REIMBURSEMENT_ACCOUNT}
validate={validate}
onSubmit={submit}
submitButtonText={props.translate('common.saveAndContinue')}
style={[styles.mh5, styles.flexGrow1]}
>
{({inputValues}) => (

{_.isFunction(children) ? children({inputValues}) : children}

inputValues is the form input values passed from the FormProvider component.

The problem is, that we initialize inputValues as an empty object.

const [inputValues, setInputValues] = useState({});

If we compare it to Form.js, we initialize inputValues with draftValues.

const [inputValues, setInputValues] = useState(() => ({...props.draftValues}));

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

Initialize inputValues with draftValues in FormProvider.

const [inputValues, setInputValues] = useState(() => ({...draftValues}));

@Sergio16T
Copy link

Sergio16T commented Nov 27, 2023

Proposal
Please re-state the problem that we are trying to solve in this issue.
The beneficial owners form doesn't show if we close and reopen the bank account page.

What is the root cause of that problem?
The Form conditionally renders when inputValues.hasOtherBeneficialOwners is true.

{Boolean(inputValues.hasOtherBeneficialOwners) && (

InputValues is provided by the FormProvider component via Render Prop Here

FormProvider HOC Component inherits the draft state from onyx here

The inputData is initialized with an empty object here and does not inherit the draft state set by the ACHContractStep

const [inputValues, setInputValues] = useState({});

The FormProvider Higher Order Component is initializing the inputValues state as an empty object.
Instead it should inherit the draft state provided by onyx for ONYXKEYS.REIMBURSEMENT_ACCOUNT

** What changes do you think we should make in order to solve the problem? **
I suggest that the FormProvider Component be updated to initialize the state with draftValues provided by Onyx.
const [inputValues, setInputValues] = useState({...draftValues});

Copy link

melvin-bot bot commented Nov 27, 2023

📣 @Sergio16T! 📣
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. Make sure you've read and understood the contributing guidelines.
  2. 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.
  3. 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.
  4. 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>

Copy link

melvin-bot bot commented Nov 27, 2023

⚠️ Invalid email. Please make sure to create an Expensify account with this email first here.

@Sergio16T
Copy link

Contributor details
Your Expensify account email: sergio.tapiafikes.dev@gmail.com
Upwork Profile Link: https://www.upwork.com/freelancers/~010bae9ca8601bb144

Copy link

melvin-bot bot commented Nov 27, 2023

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Nov 29, 2023
@Li357
Copy link
Contributor

Li357 commented Nov 29, 2023

@miljakljajic can you you reapply the Engineering label to assign another internal engineer here? I'll be back at school EOW, thanks!

@Li357 Li357 removed their assignment Nov 29, 2023
@Sergio16T
Copy link

@Li357, @miljakljajic I can put up a PR today if it's still available for contributors. Already did the research and provided proposal in comment above. Before assigning it to internal engineer, I'd love the opportunity to do the dev work on this.

@cubuspl42
Copy link
Contributor

@Sergio16T This issue is the review phase, it's in my queue and I'll jump to it today. As per the process, your proposal has to be reviewed and selected first, before you put up a PR. Please ensure you've read the contributing guidelines.

@cubuspl42
Copy link
Contributor

@bernhardoj

Just a formal question: did you test this?

@bernhardoj
Copy link
Contributor

@cubuspl42 yes, I tested it.

@cubuspl42
Copy link
Contributor

C+ reviewed 🎀 👀 🎀

I approve the proposal by @bernhardoj. It has a clear root cause analysis and provides a straight-forward solution.

Copy link

melvin-bot bot commented Nov 30, 2023

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

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

melvin-bot bot commented Nov 30, 2023

📣 @cubuspl42 🎉 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 Nov 30, 2023

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

@bernhardoj
Copy link
Contributor

PR is ready

cc: @cubuspl42

Copy link

melvin-bot bot commented Dec 8, 2023

@tylerkaraszewski, @cubuspl42, @miljakljajic, @bernhardoj Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@melvin-bot melvin-bot bot added Monthly KSv2 and removed Weekly KSv2 labels Dec 25, 2023
Copy link

melvin-bot bot commented Dec 25, 2023

This issue has not been updated in over 15 days. @tylerkaraszewski, @cubuspl42, @miljakljajic, @bernhardoj 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

@miljakljajic The PR is reviewed and merged 👍

@miljakljajic
Copy link
Contributor

Thank you! Apologies, it seems like we didn't update the title for this one. I will get everyone paid today.

@miljakljajic
Copy link
Contributor

Paid, contracts ended!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Monthly KSv2 Reviewing Has a PR in review
Projects
None yet
Development

No branches or pull requests

8 participants