Skip to content

Spend - Canadian Multiple Tax Export is shown for non-CAD expense during bulk select #97760

Closed

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.


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.
  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Create a CAD expense.
  4. Go to self DM.
  5. Create a non-CAD expense.
  6. Go to Spend > Expenses.
  7. Select the self DM expense via checkbox.
  8. Click dropdown button > Export.
    → Canadian Multiple Tax Export is not shown.
  9. Select both expenses from workspace chat and self DM.
  10. 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.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7225250_1785819233729.5.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Julia Ponikarchuk
Bug ID: 7225250

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Aug 4, 2026
  2. applause-bot commented on Aug 4, 2026

    @applause-bot
    Author

    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

  3. melvin-bot commented on Aug 4, 2026

    @melvin-bot

    You have been assigned to this deploy blocker because you recently merged this PR: #97255

  4. melvin-bot commented on Aug 4, 2026

    @melvin-bot

    @NikkiWines @thelullabyy @trjExpensify you have been assigned to this deploy blocker because you reviewed the offending PR: #97255

  5. melvin-bot commented on Aug 4, 2026

    @melvin-bot

    @dukenv0307 you have been assigned to this deploy blocker because you authored the offending PR: #97255

  6. melvin-bot commented on Aug 4, 2026

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  7. github-actions commented on Aug 4, 2026

    @github-actions
    Contributor

    👋 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:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  8. MelvinBot commented on Aug 4, 2026

    @MelvinBot
    Contributor

    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:

    …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):

    Why the repro steps behave as reported:

    • 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 and policy?.outputCurrency === CAD.
    • Apply the same guard to the other bulk caller (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) — 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.

  9. dukenv0307 commented on Aug 4, 2026

    @dukenv0307
    Contributor

    It's fixed in #97765

  10. arosiclair commented on Aug 4, 2026

    @arosiclair
    Contributor

    Fixed in v9.4.49-3

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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.EngineeringHourlyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions