Skip to content

Spend - Canadian Multiple Tax Export icon shows different icon in dropdown menu and Filters #97748

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): sdsiodjnosdjiodsj@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.5 / Chrome
App Component: Search

Action Performed:

Precondition:

  • Create a workspace with CAD currency.
  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Create a report.
  4. Go to Spend > Reports.
  5. Select the report via checkbox.
  6. Click More > Export.
    → Canadian Multiple Tax Export icon shows default export icon.
  7. Exit selection mode.
  8. Click Filter > Exported to.
    → Canadian Multiple Tax Export icon shows custom export icon.

Expected Result:

In Step 6 and 8, Canadian Multiple Tax Export will show the same icon.

Actual Result:

In Step 6, from dropdown menu, Canadian Multiple Tax Export icon shows default export icon.
In Step 8, from Filters, Canadian Multiple Tax Export icon shows custom export icon.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7225138_1785804019079.3.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Mita Rachim
Bug ID: 7225138

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    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/5ad7c2179d5d6bb93ebbce92cfe222b5f1577f9613b1f2f4bb5c517b4b9ab614

  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

    🔍 Investigation Summary

    Classification: Frontend bug
    Causing PR: #97255 - "Add Canadian Multiple Tax Export template to New Expensify for workspaces using CAD" by @dukenv0307 (High confidence)
    Related Issues: #97231 (the feature issue this PR implemented)

    Recommendation: ROLL FORWARD

    The bug is a cosmetic icon mismatch caused by one list not being updated when the new template was added. A one-line fix (registering MULTIPLE_TAX_EXPORT in the Filters selector's standard-template map) is far simpler and safer than reverting the entire CAD export feature.

    Assigned: @dukenv0307 (PR author), @NikkiWines, @thelullabyy, @trjExpensify (approving reviewers) — already assigned by melvin-bot.
    Labels: No change. DeployBlockerCash is kept — this is an App-side bug and the issue is N/A on production (new feature).

    📋 Detailed Analysis

    Evidence

    PR #97255 introduced the "Canadian Multiple Tax Export" template. It added the new option MULTIPLE_TAX_EXPORT and wired it into two places:

    • The export template builder getExportTemplates in src/libs/actions/Search.ts, where it is pushed into the default templates group for CAD workspaces.
    • The exported-to filter selector, by adding outputCurrency to exportedToPoliciesSelector in src/hooks/useExportedToFilterOptions.ts so the CAD template surfaces in the "Exported to" filter.

    However, the PR did not update the separate, hard-coded standard-template classification map used by the Filters UI to pick the icon. The two lists (bulk-export dropdown vs. Filters) decide "default icon vs. custom icon" using two independent sources of truth, and only one was updated. The bug reproduces on staging only (new feature, N/A in production), matching a frontend feature regression.

    Verification

    The bug is an icon inconsistency between two lists. The two icon-selection code paths:

    1. Bulk-export dropdown (More > Export) — src/hooks/useExportActions.ts:

      • Line 206: const isDefaultTemplate = defaultTemplates.includes(template);
      • Line 209: icon: isDefaultTemplate ? expensifyIcons.Table : expensifyIcons.TablePencil,
      • defaultTemplates comes from getExportTemplates, which PR Add Canadian Multiple Tax Export template to New Expensify for workspaces using CAD #97255 updated to include MULTIPLE_TAX_EXPORT. So here it IS a default template → gets Table (the plain/default export icon).
      • const isDefaultTemplate = defaultTemplates.includes(template);
        exportSubmenuOptions[template.name] = {
        text: template.name,
        icon: isDefaultTemplate ? expensifyIcons.Table : expensifyIcons.TablePencil,
    2. Filters "Exported to" list — src/components/Search/FilterComponents/ExportedToSelector.tsx:

      • Line 31: const STANDARD_EXPORT_TEMPLATE_ID_TO_DISPLAY_LABEL maps only REPORT_LEVEL_EXPORT and EXPENSE_LEVEL_EXPORT — not MULTIPLE_TAX_EXPORT.
      • Line 114: const isStandardTemplate = !!STANDARD_EXPORT_TEMPLATE_ID_TO_DISPLAY_LABEL[template.templateName];
      • Line 118: leftElement: tableIconForExportOption(isStandardTemplate ? expensifyIcons.Table : expensifyIcons.TablePencil),
      • Since MULTIPLE_TAX_EXPORT is absent from that map, isStandardTemplate is false → gets TablePencil (the custom export icon).
      • const STANDARD_EXPORT_TEMPLATE_ID_TO_DISPLAY_LABEL: Record<string, string> = {
      • const isStandardTemplate = !!STANDARD_EXPORT_TEMPLATE_ID_TO_DISPLAY_LABEL[template.templateName];
        standardAndIntegrationCustomTemplatePickerItems.push({
        text: displayName,
        value: filterValue,
        leftElement: tableIconForExportOption(isStandardTemplate ? expensifyIcons.Table : expensifyIcons.TablePencil),

    The template reaches the Filters list because both the selector and useExportedToFilterOptions build options via useCombinedExportTemplates → getExportTemplates, which now emits MULTIPLE_TAX_EXPORT for CAD policies (src/libs/actions/Search.ts L1758-1759):

    App/src/libs/actions/Search.ts

    Lines 1758 to 1759 in 95d364f

    if (policy?.outputCurrency === CONST.CURRENCY.CAD) {
    exportTemplates.push(normalizeTemplate(CONST.REPORT.EXPORT_OPTIONS.MULTIPLE_TAX_EXPORT, {name: translate('export.multipleTaxExport')}, CONST.EXPORT_TEMPLATE_TYPES.INTEGRATIONS));

    PR #97255 did not modify ExportedToSelector.tsx nor AccountingUtils.ts, which is exactly why the classification diverged.

    Root Cause

    There are two independent definitions of "which export templates are standard/default" for icon selection:

    • The bulk-export dropdown derives it dynamically from getExportTemplates' defaultTemplates group (updated by the PR).
    • The Filters selector derives it from a static allowlist STANDARD_EXPORT_TEMPLATE_ID_TO_DISPLAY_LABEL (not updated by the PR).

    Because MULTIPLE_TAX_EXPORT was added to the former but not the latter, the dropdown treats it as a default template (Table icon) while the Filters list treats it as a custom template (TablePencil icon), producing the reported mismatch.

    Suggested fix

    Add MULTIPLE_TAX_EXPORT to STANDARD_EXPORT_TEMPLATE_ID_TO_DISPLAY_LABEL in src/components/Search/FilterComponents/ExportedToSelector.tsx (line 31), and add a corresponding EXPORT_OPTION_LABELS.MULTIPLE_TAX_EXPORT entry in src/CONST/index.ts if a display label is required. For robustness, also consider adding it to STANDARD_EXPORT_TEMPLATE_NAME_MAPPING in src/libs/AccountingUtils.ts (L32-34) so the filter value/display name stays consistent with the other standard templates:

    const STANDARD_EXPORT_TEMPLATE_NAME_MAPPING = {
    [CONST.REPORT.EXPORT_OPTIONS.EXPENSE_LEVEL_EXPORT]: CONST.REPORT.EXPORT_OPTION_LABELS.EXPENSE_LEVEL_EXPORT,
    [CONST.REPORT.EXPORT_OPTIONS.REPORT_LEVEL_EXPORT]: CONST.REPORT.EXPORT_OPTION_LABELS.REPORT_LEVEL_EXPORT,

  9. 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.EngineeringHourlyKSv2ReviewingHas a PR in review

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions