Skip to content

[Due for payment 2025-09-19] [$375] “Start Over” in Add Bank Account flow does not clear previously entered data #69130

Closed

Description

@jponikarchuk

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: v9.1.98-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: #67519
Email or phone of affected tester (no customers): applausetester+dp265@applause.expensifail.com
Issue reported by: Applause Internal Team
Device used: Mac / Safari
App Component: Other

Action Performed:

Prerequisites: Use E account

  1. Go to a workspace with non-USD currency (e.g., EUR).
  2. Navigate to Workflows → Add Bank Account → Connect Manually.
  3. Select Country = Czech Republic and enter IBAN = CZ5508000000001234567899.
  4. Continue to the next step, enter address, and proceed to the next step.
  5. Close the RHP (Right-Hand Panel).
  6. Open the Add Bank Account flow again.
  7. On the RHP, click Start Over.
  8. Confirm the warning modal.

Expected Result:

After clicking Start Over and confirming, the Add Bank Account flow should restart from the beginning, and all previously entered data should be cleared.

Actual Result:

After confirming, the flow restarts, but all previously entered data is still visible.
User must close the RHP a second time to finally erase the previously entered data.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021961188727014869011
  • Upwork Job ID: 1961188727014869011
  • Last Price Increase: 2025-08-28
Issue OwnerCurrent Issue Owner: @garrettmknight

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Aug 25, 2025
  2. melvin-bot commented on Aug 25, 2025

    @melvin-bot

    Triggered auto assignment to @garrettmknight (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  3. nyomanjyotisa commented on Aug 25, 2025

    @nyomanjyotisa
    Member

    Proposal

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

    “Start Over” in Add Bank Account flow does not clear previously entered data

    What is the root cause of that problem?

    We are not clearing the ONYXKEYS.FORMS.REIMBURSEMENT_ACCOUNT_FORM_DRAFT on optimisticData here

    optimisticData: [
    {
    onyxMethod: Onyx.METHOD.MERGE,
    key: ONYXKEYS.REIMBURSEMENT_ACCOUNT,
    value: {
    shouldShowResetModal: false,
    isLoading: true,
    pendingAction: CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE,
    achData: null,
    },
    },
    {
    onyxMethod: Onyx.METHOD.MERGE,
    key: `${ONYXKEYS.COLLECTION.POLICY}${policyID}`,
    value: {
    achAccount: null,
    },
    },
    ],

    The draft form is only cleared in the successData

    successData: [
    {
    onyxMethod: Onyx.METHOD.SET,
    key: ONYXKEYS.FORMS.REIMBURSEMENT_ACCOUNT_FORM_DRAFT,
    value: null,
    },
    {
    onyxMethod: Onyx.METHOD.SET,
    key: ONYXKEYS.REIMBURSEMENT_ACCOUNT,
    value: CONST.REIMBURSEMENT_ACCOUNT.DEFAULT_DATA,
    },
    ],

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

    Add the draft form clearing to the optimisticData

                optimisticData: [
                    {
                        onyxMethod: Onyx.METHOD.MERGE,
                        key: ONYXKEYS.REIMBURSEMENT_ACCOUNT,
                        value: {
                            shouldShowResetModal: false,
                            isLoading: true,
                            pendingAction: CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE,
                            achData: null,
                        },
                    },
                    {
                        onyxMethod: Onyx.METHOD.MERGE,
                        key: `${ONYXKEYS.COLLECTION.POLICY}${policyID}`,
                        value: {
                            achAccount: null,
                        },
                    },
                    {
                        onyxMethod: Onyx.METHOD.SET,
                        key: ONYXKEYS.FORMS.REIMBURSEMENT_ACCOUNT_FORM_DRAFT,
                        value: null,
                    },
                ],
    

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    None

    What alternative solutions did you explore? (Optional)

    We can check if a bank account exists in achData before calling the ResetBankAccountSetup API. If no bank account exists, we should clear the local Onyx data directly instead of making the API call

        if (!achAccount) {
            Onyx.merge(ONYXKEYS.REIMBURSEMENT_ACCOUNT, {
                shouldShowResetModal: false,
                isLoading: false,
                pendingAction: null,
                achData: null,
            });
            Onyx.set(ONYXKEYS.FORMS.REIMBURSEMENT_ACCOUNT_FORM_DRAFT, null);
            Onyx.set(ONYXKEYS.REIMBURSEMENT_ACCOUNT, CONST.REIMBURSEMENT_ACCOUNT.DEFAULT_DATA);
            Onyx.merge(`${ONYXKEYS.COLLECTION.POLICY}${policyID}`, {achAccount: null});
            return;
        }
    

  4. daledah commented on Aug 25, 2025

    @daledah
    Contributor

    BE sends 400 error for ResetBankAccountSetup API so success data is not applied

    Image

    IMO we should only clear user draft if the request success so current FE logic is fine.

  5. added
    InternalRequires API changes or must be handled by Expensify staff
    on Aug 25, 2025
  6. garrettmknight commented on Aug 25, 2025

    @garrettmknight
    Contributor
  7. mountiny commented on Aug 25, 2025

    @mountiny
    Contributor

    Isnt this regression from #69130 @allgandalf @DylanDylann ?

  8. DylanDylann commented on Aug 25, 2025

    @DylanDylann
    Contributor

    @mountiny It seems you mentioned wrong link

  9. mountiny commented on Aug 25, 2025

    @mountiny
    Contributor

    This one, sorry #67519

  10. DylanDylann commented on Aug 25, 2025

    @DylanDylann
    Contributor

    Isnt this regression from #69130 @allgandalf @DylanDylann ?

    @mountiny I think no. I agree with @daledah's comment

  11. madmax330 commented on Aug 25, 2025

    @madmax330
    Contributor

    cc @MrMuzyk @hungvu193 can this be one of our PRs?

  12. MrMuzyk commented on Aug 26, 2025

    @MrMuzyk
    Contributor

    I dont think so. We havent merged anything in weeks and it used to work fine. I remember we did plenty of iterations because the reset wasn't being applied correctly.

    It seems like a BE issue. I havent checked it myself but looking at the comments we're getting 400 from BE #69130 (comment)

  13. 37 remaining items

  14. changed the title [-][$375] “Start Over” in Add Bank Account flow does not clear previously entered data[/-] [+][Due for payment 2025-09-19] [$375] “Start Over” in Add Bank Account flow does not clear previously entered data[/+] on Sep 12, 2025
  15. melvin-bot commented on Sep 12, 2025

    @melvin-bot

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

  16. melvin-bot commented on Sep 12, 2025

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.2.12-4 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 2025-09-19. 🎊

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

  17. melvin-bot commented on Sep 12, 2025

    @melvin-bot

    @allroundexperts @garrettmknight The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

  18. allroundexperts commented on Sep 13, 2025

    @allroundexperts
    Contributor

    BugZero Checklist:

    • [Contributor] Classify the bug:
    Bug classification

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other:

    Where bug was reported:

    • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
    • 2b. Reported on staging (eg. found during regression or PR testing)
    • 2d. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other:
    • [Contributor] 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: I wasn't able to pinpoint the exact PR here. It seems like a case which was never catered for in any of the PR.

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue:

    Regression Test Proposal

    Precondition:

    • Have GLOBAL_REIMBURSEMENTS_ON_ND beta turned on

    Test:

    1. Go to a workspace with non-USD currency (e.g., EUR).
    2. Navigate to Workflows → Add Bank Account → Connect Manually.
    3. Select Country = Czech Republic and enter IBAN = CZ5508000000001234567899.
    4. Continue to the next step, enter address, and proceed to the next step.
    5. Close the RHP (Right-Hand Panel).
    6. Open the Add Bank Account flow again.
    7. On the RHP, click Start Over.
    8. Confirm the warning modal.

    Verify all previously entered data is cleared.

    Do we agree 👍 or 👎

  19. garrettmknight commented on Sep 15, 2025

    @garrettmknight
    Contributor
  20. garrettmknight commented on Sep 19, 2025

    @garrettmknight
    Contributor

    Payment summary:

  21. trjExpensify commented on Jan 5, 2026

    @trjExpensify
    Contributor

    approved $375 for @allroundexperts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions