You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Spend - Canadian Multiple Tax Export is shown for non-CAD expense during bulk select #97760
Version Number: 9.4.49-0 Reproducible in staging?: Yes Reproducible in production?: N/A - new feature, doesn't exist in prod If this was caught during regression testing, add the test name, ID and link from BrowserStack:#97255 Email or phone of affected tester (no customers):sjdoisjdosjnoinsjio@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.5 / Chrome App Component: Money Requests
Action Performed:
Precondition:
Create a workspace with CAD currency.
Go to staging.new.expensify.com
Go to workspace chat.
Create a CAD expense.
Go to self DM.
Create a non-CAD expense.
Go to Spend > Expenses.
Select the self DM expense via checkbox.
Click dropdown button > Export.
→ Canadian Multiple Tax Export is not shown.
Select both expenses from workspace chat and self DM.
Click dropdown button > Export.
→ Canadian Multiple Tax Export is shown.
Expected Result:
When both expenses from CAD workspace and self DM are selected, Canadian Multiple Tax Export should be hidden.
Actual Result:
When both expenses from CAD workspace and self DM are selected, Canadian Multiple Tax Export is hidden.
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
Root Cause: The "Canadian Multiple Tax Export" option is shown whenever a single workspace policy in the selection outputs CAD — it never checks that all selected expenses are CAD. Because a self-DM expense has no policyID, it gets silently dropped when resolving the selection's policy, so a mixed CAD-workspace + non-CAD-self-DM selection collapses to just the CAD policy and the CAD-only template appears. Introduced by #97255.
The visibility gate keys off one policy's outputCurrency:
…and in the Search bulk flow policy is resolved from selectedPolicyIDs, which drops any transaction without a policyID (i.e. self-DM expenses) via .filter(Boolean):
Step 7-8 (only the self-DM non-CAD expense selected): it has no policyID → selectedPolicyIDs = [] → policy = undefined → template correctly hidden.
Step 9-10 (CAD workspace expense + non-CAD self-DM expense): the self-DM expense contributes no policyID, leaving exactly one policyID (the CAD workspace) → policy resolves to the CAD policy → outputCurrency === 'CAD' → template wrongly shown.
Recommended Fix: Gate the template on the actual selected expenses, not on one collapsed policy's currency. There's already a selectedBulkCurrency in the same hook, but it only reads .at(0), so it doesn't help here either. Add an explicit "all selected are CAD" check and pass it through to getExportTemplates:
In useSearchBulkActions.ts, compute allSelectedAreCAD = Object.values(selectedTransactions).length > 0 && Object.values(selectedTransactions).every((t) => t.currency === CONST.CURRENCY.CAD) and pass it to getExportTemplates.
In getExportTemplates (Search.ts), gate the MULTIPLE_TAX_EXPORT push on that flag andpolicy?.outputCurrency === CAD.
Since #97255 is a small, self-contained new feature, reverting it is the safe deploy-blocker default; the roll-forward above is minimal if the team prefers to keep the feature this release.
The root cause is entirely in Expensify/App (frontend) — keep DeployBlockerCash, no backend involvement.
Next Steps: Reply with @MelvinBot implement this to create a draft PR, or @MelvinBot <your feedback> to refine this analysis.
Activity
applause-bot commentedon Aug 4, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/ed761e04261acd7996e19524b919d416eaa237e45b8c900fe9fb42d99a588a6e
melvin-bot commentedon Aug 4, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #97255
melvin-bot commentedon Aug 4, 2026
@NikkiWines @thelullabyy @trjExpensify you have been assigned to this deploy blocker because you reviewed the offending PR: #97255
melvin-bot commentedon Aug 4, 2026
@dukenv0307 you have been assigned to this deploy blocker because you authored the offending PR: #97255
melvin-bot commentedon Aug 4, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Aug 4, 2026
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
MelvinBot commentedon Aug 4, 2026
Issue Analysis
Root Cause: The "Canadian Multiple Tax Export" option is shown whenever a single workspace policy in the selection outputs CAD — it never checks that all selected expenses are CAD. Because a self-DM expense has no
policyID, it gets silently dropped when resolving the selection's policy, so a mixed CAD-workspace + non-CAD-self-DM selection collapses to just the CAD policy and the CAD-only template appears. Introduced by #97255.The visibility gate keys off one policy's
outputCurrency:src/libs/actions/Search.ts:1758—if (policy?.outputCurrency === CONST.CURRENCY.CAD) { …push(MULTIPLE_TAX_EXPORT) }…and in the Search bulk flow
policyis resolved fromselectedPolicyIDs, which drops any transaction without apolicyID(i.e. self-DM expenses) via.filter(Boolean):src/hooks/useSearchBulkActions.ts:527-536— buildsselectedPolicyIDswith.filter(Boolean)src/hooks/useSearchBulkActions.ts:1630—const policy = selectedPolicyIDs.length === 1 ? policies?.[…] : undefinedWhy the repro steps behave as reported:
selectedPolicyIDs = []→policy = undefined→ template correctly hidden.policyresolves to the CAD policy →outputCurrency === 'CAD'→ template wrongly shown.Recommended Fix: Gate the template on the actual selected expenses, not on one collapsed policy's currency. There's already a
selectedBulkCurrencyin the same hook, but it only reads.at(0), so it doesn't help here either. Add an explicit "all selected are CAD" check and pass it through togetExportTemplates:useSearchBulkActions.ts, computeallSelectedAreCAD = Object.values(selectedTransactions).length > 0 && Object.values(selectedTransactions).every((t) => t.currency === CONST.CURRENCY.CAD)and pass it togetExportTemplates.getExportTemplates(Search.ts), gate theMULTIPLE_TAX_EXPORTpush on that flag andpolicy?.outputCurrency === CAD.src/hooks/useSelectedTransactionsActions.ts~L396) for consistency.Since #97255 is a small, self-contained new feature, reverting it is the safe deploy-blocker default; the roll-forward above is minimal if the team prefers to keep the feature this release.
The root cause is entirely in
Expensify/App(frontend) — keepDeployBlockerCash, no backend involvement.Next Steps: Reply with
@MelvinBot implement thisto create a draft PR, or@MelvinBot <your feedback>to refine this analysis.dukenv0307 commentedon Aug 4, 2026
It's fixed in #97765
arosiclair commentedon Aug 4, 2026
Fixed in v9.4.49-3