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

[$1000] Web - Routing number field for new workspace is populated with value from deleted workspace. #23480

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

Comments

@kbecciv
Copy link

kbecciv commented Jul 24, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. Open the app
  2. Create a workspace.
  3. Go to Bank Account
  4. Update currency to USD on popup.
  5. Click on 'connect manually'.
  6. Enter a routing number.
  7. Now instead of clicking on continue, go back and delete that workspace.
  8. Create a workspace again.
  9. Go to Bank account and change currency to USD.
  10. Go to 'connect manually'

Expected Result:

The routing number field should be empty.

Actual Result:

Routing number field is populated with routing number value which we had entered in our deleted workspace.

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.43-7
Reproducible in staging?: y
Reproducible in production?: y
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.Recording.2023-07-23.at.3.44.12.PM.mov
Recording.3872.mp4

Expensify/Expensify Issue URL:
Issue reported by: @mehvash-Khan
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1690113213055829

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~012d45e1d746eb489a
  • Upwork Job ID: 1683580182181593088
  • 2023-07-24
  • Automatic offers:
    • samh-nl | Contributor | 25818185
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jul 24, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 24, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jul 24, 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

@hungvu193
Copy link
Contributor

hungvu193 commented Jul 24, 2023

Proposal

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

Web - Routing number field for new workspace is populated with value from deleted workspace.

What is the root cause of that problem?

We didn't clear the bank account data while deleting a workspace which cause the issue.

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

I think that make senses to keep bank account data if we still have workspaces since we shared the bankAccount data between workspace, we should only clear it when we don't have any workspace. So we can add a useEffect inside our WorkspacesListPage if our policies are empty then clear the bankAccount data.

    React.useEffect(() => {
        if (_.isEmpty(policies)) {
            // clear bank account data with BankAccounts.resetFreePlanBankAccount(bankAccountID)}
        }
    }, [policies]);

What alternative solutions did you explore? (Optional)

N/A

@samh-nl
Copy link
Contributor

samh-nl commented Jul 24, 2023

Proposal

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

A new workspace is populated with routing number field of a deleted workspace.

What is the root cause of that problem?

The bank account form data is re-used between workspaces:

<Form
formID={ONYXKEYS.FORMS.REIMBURSEMENT_ACCOUNT_FORM}

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

We can append the workspace ID to the Onyx key to ensure the data does not spill over.

What alternative solutions did you explore? (Optional)

Alternatively, upon deleting the (last) workspace we can clear the information.

@yh-0218
Copy link
Contributor

yh-0218 commented Jul 24, 2023

Proposal

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

A new workspace is populated with routing number field of a deleted workspace.

What is the root cause of that problem?

The bank account form data is re-used between all workspaces because we use same inputID

<TextInput
autoFocus
shouldDelayFocus={shouldDelayFocus}
inputID="routingNumber"
label={translate('bankAccount.routingNumber')}
accessibilityLabel={translate('bankAccount.routingNumber')}
accessibilityRole={CONST.ACCESSIBILITY_ROLE.TEXT}
defaultValue={props.getDefaultStateForField('routingNumber', '')}
keyboardType={CONST.KEYBOARD_TYPE.NUMBER_PAD}
disabled={shouldDisableInputs}
shouldSaveDraft
shouldUseDefaultValue={shouldDisableInputs}
/>

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

We can get policyID as props from ReimbursementAccountPage -> BankAccountStep -> BankAccountManualStep.
And we can use different inputID between workspaces

inputID={`${props.policyID}-routingNumber`}
defaultValue={props.getDefaultStateForField(`${props.policyID}-routingNumber`, '')}

In this case, input will be clear on new workspace and we can use other values between workspace

What alternative solutions did you explore? (Optional)

@kevinksullivan kevinksullivan added the External Added to denote the issue can be worked on by a contributor label Jul 24, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 24, 2023

Unable to auto-create job on Upwork. The BZ team member should create it manually for this issue. cc @thienlnam

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

melvin-bot bot commented Jul 24, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jul 24, 2023

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

@thienlnam thienlnam added External Added to denote the issue can be worked on by a contributor and removed External Added to denote the issue can be worked on by a contributor labels Jul 24, 2023
@melvin-bot melvin-bot bot changed the title Web - Routing number field for new workspace is populated with value from deleted workspace. [$1000] Web - Routing number field for new workspace is populated with value from deleted workspace. Jul 24, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 24, 2023

Job added to Upwork: https://www.upwork.com/jobs/~012d45e1d746eb489a

@melvin-bot
Copy link

melvin-bot bot commented Jul 24, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jul 24, 2023

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

@melvin-bot melvin-bot bot added the Overdue label Jul 26, 2023
@parasharrajat
Copy link
Member

Still discussing...

@melvin-bot melvin-bot bot removed the Overdue label Jul 27, 2023
@parasharrajat
Copy link
Member

Given that there are no objections and one plus vote with a good reason to move forward, I think we should change this.

@parasharrajat
Copy link
Member

@samh-nl 's proposal looks good to me.

🎀 👀 🎀 C+ reviewed

@melvin-bot
Copy link

melvin-bot bot commented Jul 28, 2023

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

@hungvu193
Copy link
Contributor

@samh-nl 's proposal looks good to me.

🎀 👀 🎀 C+ reviewed

AFAIK, we're sharing bank account information between workspaces. If you already completed 4 steps, when you created a new one, and press connect bank account you can start from step 4 instead of starting from over again.
Why don't we just clear the data when there's no workspace instead of giving each of them difference draft values?

@parasharrajat
Copy link
Member

Good point. I moved based on the Slack discussion. Free to share your points there.

@melvin-bot
Copy link

melvin-bot bot commented Jul 28, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jul 28, 2023

📣 @mehvash-Khan We're missing your Upwork ID to automatically send you an offer for the Reporter role.
Once you apply to the Upwork job, your Upwork ID will be stored and you will be automatically hired for future jobs!

@mehvash-Khan
Copy link

I have applied to the Upwork job. Thanks.

@melvin-bot melvin-bot bot added the Overdue label Jul 31, 2023
@samh-nl
Copy link
Contributor

samh-nl commented Jul 31, 2023

The policyID would have to be appended to reimbursementAccount Onyx data returned from the backend also to separate them out per workspace.

@melvin-bot melvin-bot bot removed the Overdue label Jul 31, 2023
@parasharrajat
Copy link
Member

Ok, Sure. I will review this on the PR.

@parasharrajat
Copy link
Member

PR has more than expected changes. It was my mistake that I didn't think it through during the proposal review. At this stage, I feel like we need to discuss this again. we are touching mostly everything related to policies in the app and there can be unexpected bugs with these changes. It has been bothering me and I couldn't move ahead with the PR.

I am going to ask for opinions on Slack or ask for helping hands.

@samh-nl
Copy link
Contributor

samh-nl commented Aug 18, 2023

@parasharrajat Understandable, for anyone that would like to get involved, this comment in the PR may be useful (see "High-level summary of changes" and "Requested backend change").

@mehvash-Khan
Copy link

Hi @parasharrajat , Is this issue open for more proposals? Can I add a proposal?

@parasharrajat
Copy link
Member

@mehvash-Khan Currently, it is assigned to a contributor. Rest, I live it up to you.

@jasperhuangg
Copy link
Contributor

jasperhuangg commented Aug 21, 2023

we are touching mostly everything related to policies in the app and there can be unexpected bugs with these changes

@parasharrajat Can you outline what changes introduced in the PR might cause bugs with policies?

Otherwise, I mostly agree with your feedback. I'm realizing that bank accounts aren't stored with policies in the back-end, so it actually may not make much sense to start associating with them policies. We may be able to implement a simpler, front-end only solution that solves this issue.

Sorry for the back and forth! @samh-nl

@samh-nl
Copy link
Contributor

samh-nl commented Aug 24, 2023

Any update? Thanks. Merging does become increasingly difficult over time, so might be good to give some priority on deciding what the best way forward is.

@jasperhuangg
Copy link
Contributor

@samh-nl I'm honestly starting to think we can just do nothing here. I don't think this particular bug is extremely detrimental to user experience. I'm not really sure if it's worth considering this a bug at all, it could even be considered a feature that your bank account information is saved between workspaces. I'm going to go ahead and close this out.

@samh-nl
Copy link
Contributor

samh-nl commented Aug 28, 2023

Fair enough. I will comfort myself with the thought that if this ever gets implemented, the work done might save people some time and it wasn't completely in vain.

@samh-nl
Copy link
Contributor

samh-nl commented Sep 13, 2023

Just curious as I recently saw a closed issue was being compensated due to this passage in the contributors guide:

Compensation is only guaranteed to those who propose a solution and get hired for that job.

Anything that can be done in this case? Thanks a lot.

@hungvu193
Copy link
Contributor

Just curious as I recently saw a closed issue was being compensated due to this passage in the contributors guide:

Compensation is only guaranteed to those who propose a solution and get hired for that job.

Anything that can be done in this case? Thanks a lot.

hey can you raise a slack discussion for that? I'm running into a similar case.

@parasharrajat
Copy link
Member

@kevinksullivan Can you please look into the above request #23480 (comment)?

@kevinksullivan
Copy link
Contributor

@parasharrajat
Copy link
Member

Any results @kevinksullivan ?

@kevinksullivan
Copy link
Contributor

We only pay when someone has done the work, sorry for any confusion here.

Copy link

melvin-bot bot commented Dec 25, 2023

⚠️ 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.

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

No branches or pull requests

9 participants