Skip to content

[Due for payment 2025-05-22] Workspace - "Start over" button is missing for a CAD manual bank account flow #60570

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: 9.1.30-0
Reproducible in staging?: Yes
Reproducible in production?: Unable to check in Production, it asks to update the currency to USD.
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A
If this was caught during regression testing, add the test name, ID and link from TestRail: #56931
Email or phone of affected tester (no customers): N/A
Issue reported by: Applause Internal Team
Device used: Windows 10 / Chrome, macOS Sequoia 15.3
App Component: Workspace Settings

Action Performed:

  1. Navigate to https://staging.new.expensify.com/
  2. Log in with a new Expensifail account
  3. Create a workspace with "CAD" default currency
  4. Navigate to Workspace settings - Workflows - Connect bank account - Connect manually
  5. Click on the "Confirm" button
  6. Input any formally valid data to all of the fields
  7. Click on the "Next" button
  8. Dismiss the RHP by clicking away
  9. Click on the "Connect bank account" button

Expected Result:

"Start over" button should be visible after any input is saved.

Actual Result:

"Start over" button is missing for a CAD manual bank account flow.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

1.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @Christinadobrzyn

Activity

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

    @melvin-bot

    Triggered auto assignment to @Christinadobrzyn (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. nkdengineer commented on Apr 21, 2025

    @nkdengineer
    Contributor

    Proposal

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

    "Start over" button is missing for a CAD manual bank account flow.

    What is the root cause of that problem?

    This callback

    const hasInProgressNonUSDVBBA = useCallback((): boolean => {
    return (!!achData?.bankAccountID && !!achData?.created) || (policyCurrency === CONST.CURRENCY.EUR && nonUSDCountryDraftValue !== '');
    }, [achData?.bankAccountID, achData?.created, nonUSDCountryDraftValue, policyCurrency]);

    is implemented incorrectly. It only returns true if policyCurrency is EUR

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

    Since we check for non USD flow, we can update this

    const hasInProgressNonUSDVBBA = useCallback((): boolean => {
    return (!!achData?.bankAccountID && !!achData?.created) || (policyCurrency === CONST.CURRENCY.EUR && nonUSDCountryDraftValue !== '');
    }, [achData?.bankAccountID, achData?.created, nonUSDCountryDraftValue, policyCurrency]);

        const hasInProgressNonUSDVBBA = useCallback((): boolean => {
            return (!!achData?.bankAccountID && !!achData?.created) || (policyCurrency !== CONST.CURRENCY.USD && nonUSDCountryDraftValue !== '');
        }, [achData?.bankAccountID, achData?.created, nonUSDCountryDraftValue, policyCurrency]);

    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)

    Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

  4. mohit6789 commented on Apr 21, 2025

    @mohit6789
    Contributor

    Proposal

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

    Start over" button is missing for a CAD manual bank account flow

    What is the root cause of that problem?

    We show start over button if shouldShowContinueSetupButtonValue return true.

    const hasInProgressNonUSDVBBA = useCallback((): boolean => {
    return (!!achData?.bankAccountID && !!achData?.created) || (policyCurrency === CONST.CURRENCY.EUR && nonUSDCountryDraftValue !== '');
    }, [achData?.bankAccountID, achData?.created, nonUSDCountryDraftValue, policyCurrency]);

    But due to this condition shouldShowContinueSetupButtonValue only returns true if policyCurrency === CONST.CURRENCY.EUR.

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

    To fix this issue we need to check for all the allowed currency instead of only EUR. We can change this code with following code.

    Option 1

    const hasInProgressNonUSDVBBA = useCallback((): boolean => {
      // check if policyCurrency is supported for global reimbursement and canUseGlobalReimbursementsOnND beta is true.
      const isCurrencySupported = isCurrencySupportedForGlobalReimbursement(policyCurrency as CurrencyType, canUseGlobalReimbursementsOnND ?? false);
      return (!!achData?.bankAccountID && !!achData?.created) || (isNonUSDWorkspace && isCurrencySupported && nonUSDCountryDraftValue !== '');
    }, [achData?.bankAccountID, achData?.created, nonUSDCountryDraftValue, policyCurrency, isNonUSDWorkspace, canUseGlobalReimbursementsOnND]);

    Option 2

    We can remove check for isNonUSDWorkspace as it is already exist here

     const hasInProgressNonUSDVBBA = useCallback((): boolean => {
        // check if policyCurrency is supported for global reimbursement and canUseGlobalReimbursementsOnND beta is true.
        const isCurrencySupported = isCurrencySupportedForGlobalReimbursement(policyCurrency as CurrencyType, canUseGlobalReimbursementsOnND ?? false);
        return (!!achData?.bankAccountID && !!achData?.created) || (isCurrencySupported && nonUSDCountryDraftValue !== '');
      }, [achData?.bankAccountID, achData?.created, nonUSDCountryDraftValue, policyCurrency, canUseGlobalReimbursementsOnND]);

    Option 3

    If we don't want to check for BETA then we can do following code

    /** Returns true if user passed first step of flow for non USD VBBA */
    const hasInProgressNonUSDVBBA = useCallback((): boolean => {
        // check if policyCurrency is supported for global reimbursement.
        const isCurrencySupported = CONST.DIRECT_REIMBURSEMENT_CURRENCIES.includes(policyCurrency as CurrencyType);
        return (!!achData?.bankAccountID && !!achData?.created) || (isCurrencySupported && nonUSDCountryDraftValue !== '');
    }, [achData?.bankAccountID, achData?.created, nonUSDCountryDraftValue, policyCurrency]);

    OR

    const hasInProgressNonUSDVBBA = useCallback((): boolean => {
            // check if policyCurrency is supported for global reimbursemen.
            const isCurrencySupported = CONST.DIRECT_REIMBURSEMENT_CURRENCIES.includes(policyCurrency as CurrencyType);
            return (!!achData?.bankAccountID && !!achData?.created) || (isNonUSDWorkspace && isCurrencySupported && nonUSDCountryDraftValue !== '');
        }, [achData?.bankAccountID, achData?.created, nonUSDCountryDraftValue, policyCurrency, isNonUSDWorkspace]);

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

    Test if shouldShowContinueSetupButtonValue return true for all allowed currency.

    What alternative solutions did you explore? (Optional)

  5. Christinadobrzyn commented on Apr 21, 2025

    @Christinadobrzyn
    Contributor

    I don't see the Start Over when changing the workspace to USD, so I don't get this. I'll test against other apps, maybe that's the connection.

  6. Christinadobrzyn commented on Apr 22, 2025

    @Christinadobrzyn
    Contributor

    reaching out here #50912 to see what next steps should be here

  7. hungvu193 commented on Apr 23, 2025

    @hungvu193
    Contributor

    We will fix this one as a follow-up in #60633

  8. MrMuzyk commented on Apr 23, 2025

    @MrMuzyk
    Contributor

    We will fix this one as a follow-up in #60633

    As @hungvu193 mentioned, we're now working on fixing everything QAs can find in global reimbursements flow. You can assign this issue to me and I'll link it in the followup issue and fix it.

  9. Christinadobrzyn commented on Apr 23, 2025

    @Christinadobrzyn
    Contributor

    Hi @hungvu193 and @MrMuzyk thank you for the update! @MrMuzyk I just assigned you to this issue. Let me know if you need anything else for the time being.

  10. MrMuzyk commented on Apr 24, 2025

    @MrMuzyk
    Contributor

    Because there were other issues with the flow and they're all relatively small we've decided to fix all of them in one big follow-up issue - #60633

  11. 24 remaining items

  12. melvin-bot commented on May 19, 2025

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (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.

  13. Christinadobrzyn commented on May 19, 2025

    @Christinadobrzyn
    Contributor

    Just a heads up that I'm going to be ooo May 21st - May 27th. Back on the 28th.

    I'll assign someone to close this when it's ready. Payment summary - #60570 (comment)

    @madmax330 @MrMuzyk do we need a regression test?

    cc @mallenexpensify

  14. madmax330 commented on May 20, 2025

    @madmax330
    Contributor

    No I don't think we need a regression test for this

  15. melvin-bot commented on May 22, 2025

    @melvin-bot

    Skipping the payment summary for this issue since all the assignees are employees or vendors. If this is incorrect, please manually add the payment summary SO.

  16. melvin-bot commented on May 27, 2025

    @melvin-bot

    @Christinadobrzyn Huh... This is 4 days overdue. Who can take care of this?

  17. sakluger commented on May 28, 2025

    @sakluger
    Contributor

    No payment summary required and no regression steps required. Closing.

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

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions