Repository navigation
[Due for payment 2025-05-22] Workspace - "Start over" button is missing for a CAD manual bank account flow #60570
Description
Activity
- addedBugSomething is broken. Auto assigns a BugZero manager.Something is broken. Auto assigns a BugZero manager.DailyKSv2KSv2
on 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.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
App/src/pages/ReimbursementAccount/ReimbursementAccountPage.tsx
Lines 113 to 115 in 7a42c6a
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
trueifpolicyCurrencyisEURWhat changes do you think we should make in order to solve the problem?
Since we check for non USD flow, we can update this
App/src/pages/ReimbursementAccount/ReimbursementAccountPage.tsx
Lines 113 to 115 in 7a42c6a
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.
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
shouldShowContinueSetupButtonValuereturn true.
App/src/pages/ReimbursementAccount/ReimbursementAccountPage.tsx
Lines 113 to 115 in 7a42c6a
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
shouldShowContinueSetupButtonValueonly returns true ifpolicyCurrency === 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
shouldShowContinueSetupButtonValuereturn true for all allowed currency.What alternative solutions did you explore? (Optional)
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.
reaching out here #50912 to see what next steps should be here
Reacted by Hans VuWe will fix this one as a follow-up in #60633
Reacted by Christina DobrzynskiWe 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.
Reacted by Christina DobrzynskiHi @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.
Reacted by MrMuzykBecause 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
Reacted by Christina Dobrzynski24 remaining items
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.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?
No I don't think we need a regression test for this
Reacted by Christina Dobrzynski and Matt AllenSkipping 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.
@Christinadobrzyn Huh... This is 4 days overdue. Who can take care of this?
No payment summary required and no regression steps required. Closing.
Metadata
Metadata
Labels
Type
Projects
- StatusShow more project fieldsDone
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:
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:
Screenshots/Videos
1.mp4
View all open jobs on GitHub
Issue Owner
Current Issue Owner: @Christinadobrzyn