Skip to content

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

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

Open
2 of 8 tasks
jponikarchuk opened this issue Apr 21, 2025 · 21 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2

Comments

@jponikarchuk
Copy link

jponikarchuk commented Apr 21, 2025

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] 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
@jponikarchuk jponikarchuk added Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 labels Apr 21, 2025
Copy link

melvin-bot bot commented Apr 21, 2025

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.

@nkdengineer
Copy link
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.

@mohit6789
Copy link
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)

@Christinadobrzyn
Copy link
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.

@Christinadobrzyn
Copy link
Contributor

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

@hungvu193
Copy link
Contributor

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

@MrMuzyk
Copy link
Contributor

MrMuzyk commented Apr 23, 2025

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.

@Christinadobrzyn
Copy link
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.

@MrMuzyk
Copy link
Contributor

MrMuzyk commented Apr 24, 2025

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

@melvin-bot melvin-bot bot added the Overdue label Apr 28, 2025
Copy link

melvin-bot bot commented Apr 28, 2025

@MrMuzyk, @Christinadobrzyn Whoops! This issue is 2 days overdue. Let's get this updated quick!

@MrMuzyk
Copy link
Contributor

MrMuzyk commented Apr 28, 2025

Working on a solution

@melvin-bot melvin-bot bot removed the Overdue label Apr 28, 2025
@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Apr 30, 2025
@Christinadobrzyn
Copy link
Contributor

Hi @MrMuzyk just checking on this, can you provide an update? TY!

@MrMuzyk
Copy link
Contributor

MrMuzyk commented May 7, 2025

Hey @Christinadobrzyn! PR that will fix it is in review currently. I'll post a comment here once it's merged so it can be retested and closed.

@MrMuzyk
Copy link
Contributor

MrMuzyk commented May 8, 2025

PR that fixes it just got merged. This will be ready to be retested soon.

@Christinadobrzyn
Copy link
Contributor

monitoring - #60696

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels May 15, 2025
@melvin-bot melvin-bot bot changed the title Workspace - "Start over" button is missing for a CAD manual bank account flow [Due for payment 2025-05-22] Workspace - "Start over" button is missing for a CAD manual bank account flow May 15, 2025
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label May 15, 2025
Copy link

melvin-bot bot commented May 15, 2025

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

Copy link

melvin-bot bot commented May 15, 2025

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.45-21 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-05-22. 🎊

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

  • @MrMuzyk does not require payment (Contractor)

Copy link

melvin-bot bot commented May 15, 2025

@madmax330 @Christinadobrzyn @MrMuzyk 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]

@Christinadobrzyn Christinadobrzyn removed the Bug Something is broken. Auto assigns a BugZero manager. label May 19, 2025
@Christinadobrzyn Christinadobrzyn removed their assignment May 19, 2025
@Christinadobrzyn Christinadobrzyn added the Bug Something is broken. Auto assigns a BugZero manager. label May 19, 2025
Copy link

melvin-bot bot commented May 19, 2025

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.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels May 19, 2025
@Christinadobrzyn
Copy link
Contributor

Christinadobrzyn commented May 19, 2025

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

@Christinadobrzyn Christinadobrzyn self-assigned this May 19, 2025
@madmax330
Copy link
Contributor

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

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 Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2
Projects
Status: LOW
Development

No branches or pull requests

8 participants