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
[Due for payment 2026-10-23] [$175] Unable to see "export To" when selecting group of expenses #100074
Version Number: 9.4.65-3 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from BrowserStack: Email or phone of affected tester (no customers): Logs:https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by:@abbagail Slack conversation (hyperlinked to channel name): #Expensify Bugs
Action Performed:
On the spend page, filter by Accounting and choose card accrual, cash accrual, bank reconciliation, card statements, or any other option that has display: by group > user/card/bank
Click the grouping to see the expenses
Select the group > X Selected to see options for those expenses/line items
Expected Result:
Export To > select export option
Actual Result:
Export To doesn't show up as an option. In order to get "Export To" to show up, you have to manually select all line items/expenses in that group.
Workaround:
Unknown
Platforms:
Select the officially supported platforms where the issue was reproduced:
Selecting a group row on a grouped search suppresses the whole export-template list, which leaves the export menu with exactly one entry. That single entry then replaces the "Export ›" parent row, so the menu shows a row labelled "Current view" instead of "Export".
Selecting the line items one by one works because toggling any individual row clears the group tag at SearchWriteActionsProvider.tsx:436-437, which makes includesGroupExport false and brings the full template submenu back.
All four Accounting views named in the report (card accruals, cash accruals, card statements, bank reconciliation) are type: expense with a groupBy — see SearchUIUtils.ts:901-985 — so they always take this path.
What changes do you think we should make in order to solve the problem?
Stop using includesGroupExport to hide the export templates in useSearchBulkActions.ts:2044. Group selections already export correctly — handleCSVExport and beginExportWithTemplate both convert a group selection into a query filter via addSelectedGroupsFilter (useSearchBulkActions.ts:186, used at :846-863 and :979-995) — so the templates work; they are just not offered.
The existing !isGroupedSearch guards at :1779 and :2073 keep the basic CSV export hidden on grouped searches, which is the documented intent (it carries fewer columns than "Current view"). That part should stay.
Worth confirming with the product owner first: is "no templates for a group selection" intentional, or collateral from moving group export onto the query-filter path? If it is intentional, the fix moves to :2092 — don't let a single sub-item silently rename the "Export" parent row.
What alternative solutions did you explore? (Optional)
Alternatives considered and ruled out
Empty export templates. Ruled out. getExportTemplates at src/libs/actions/Search.ts:2001-2003 always seeds at least the expense-level export, independent of policy. So a missing policy (the group pseudo-entry resolves to policyID: _FAKE_) cannot empty the list.
exportButtonOption being dropped. Ruled out. It is pushed unconditionally at useSearchBulkActions.ts:2394 and there is no if anywhere that removes it. The row is present — only its label is wrong.
Report-level "Export to <integration>". Not the cause here. That block is gated on isReportsTab (:1824), which is false on all four type: expense Accounting views regardless of how you select.
Only the fix at :2092. Renaming the row back to "Export" would restore the label but still offer just one export destination, which doesn't match "Export To > select export option" in the expected result.
Two selection shapes exist, and both trip the same flag. A collapsed group with no children loaded stores one group_<id> stub (SearchWriteActionsProvider.tsx:463-476); an expanded group stores one entry per child tagged isSelectedViaGroup: true (:519). isGroupSelection at :182-184 matches both, so a fix must cover both.
Separate quirk found while tracing (not part of this bug). Select a group while it is collapsed, then expand it: the reconcile at SearchWriteActionsProvider.tsx:214-215 keeps groupKey but loses isSelectedViaGroup, so the same user action ends in two different states depending on expand order.
Verification status. This is traced from code, not a live repro — the browser test session never rendered, so I could not confirm the exact rendered label. The claim to check first is that the row reads "Current view" rather than "Export ›".
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/100074) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
if(!allSelectedAreDeleted&&!includesGroupExport){// Builds template export options and pushes into exportOptions
...
}
When a group of expenses is selected in a grouped search view (such as the Accounting views: card accruals, cash accruals, card statements, or bank reconciliation), includesGroupExport evaluates to true.
As a result:
All default and custom export templates are omitted from exportOptions.
exportOptions only contains a single item: Current view (pushed at line 2049).
At lines 2092-2095, when exportOptions.length === 1, the bulk actions menu collapses the single submenu option into the parent button, replacing the "Export To" / "Export" menu button with the direct label "Current view".
Group selections already support template exports via beginExportWithTemplate and handleCSVExport, which properly convert group selections into query filters via addSelectedGroupsFilter (useSearchBulkActions.ts:186, :846-863, :979-995). However, !includesGroupExport at line 2062 still prevents these templates from being populated.
What changes do you think we should make in order to solve the problem?
In src/hooks/useSearchBulkActions.ts:
Remove the !includesGroupExport check from line 2062:
if(!allSelectedAreDeleted){
This allows the available default and custom export templates to be pushed into exportOptions for group selections, preserving the full "Export To" menu and its sub-options.
Keep the existing !isGroupedSearch guard in availableDefaultTemplates / handleBasicExport (useSearchBulkActions.ts:1779, :2073) so that basic CSV export continues to be hidden on grouped searches where "Current view" is preferred.
Add a unit test in SearchBulkActionsTest confirming that selecting a grouped transaction row populates exportOptions with both Current view and the available export templates.
What alternative solutions did you explore? (Optional)
Forcing the parent button label to stay "Export" when exportOptions.length === 1: Rejected because while it fixes the parent label, it still only offers a single option ("Current view") without making the export templates available for group selections.
Please mark it as "Ready for review" when it is ready for review.
What changed: removed the includesGroupExport gate in src/hooks/useSearchBulkActions.ts, so selecting a group row on a grouped search now offers the export templates instead of leaving "Current view" as the only option.
Why this is safe
That flag came from #88577, when a collapsed group stub carried no transaction IDs to export. Group selections are now exported through a query filter instead — addSelectedGroupsFilter, which both handleCSVExport and beginExportWithTemplate already apply — so the templates work for a group selection; they were just never offered.
The basic export stays hidden on grouped searches. That is gated separately on !isGroupedSearch (it carries fewer columns than "Current view") and this PR does not touch it.
Both selection shapes are covered by new unit tests: a collapsed group stored as a single group_<id> stub, and an expanded group stored as one entry per child tagged isSelectedViaGroup.
Tests run
npm test -- tests/unit/hooks/useSearchBulkActionsExportTest.ts — 34 passed
npm run lint-changed, npm run typecheck, spell check — all passed
React Compiler: this file is already non-compliant on main (9 babel / 8 oxc errors) and the counts are identical after the change, so no regression
Not run: browser verification. The test session rendered a blank page after sign-in, so the flow could not be driven end to end. Manual test steps are in the PR for a human pass.
One thing worth confirming during review: the proposal flagged a possible product question — whether hiding templates for a group selection was ever intentional. Nothing in the code or the originating PR suggests it was, so I implemented the proposal as written.
Three issues look like they may share this root cause and could be worth deduping: #99089, #97217, and #98911.
changed the title [-]Unable to see "export To" when selecting group of expenses[/-][+][$175] Unable to see "export To" when selecting group of expenses[/+]on Sep 30, 2026
This issue has not been updated in over 15 days. @eVoloshchak, @JS00001 eroding to Monthly issue.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
changed the title [-][$175] Unable to see "export To" when selecting group of expenses[/-][+][Due for payment 2026-10-23] [$175] Unable to see "export To" when selecting group of expenses[/+]on Oct 16, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.12-1 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 2026-10-23. 🎊
The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ 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]. If no checklist is needed for this issue, you can click: [no checklist button]
Activity
MelvinBot commentedon Sep 1, 2026
Proposal
What is the root cause of that problem?
Selecting a group row on a grouped search suppresses the whole export-template list, which leaves the export menu with exactly one entry. That single entry then replaces the "Export ›" parent row, so the menu shows a row labelled "Current view" instead of "Export".
The flag that does it is
includesGroupExportinsrc/hooks/useSearchBulkActions.ts:1793:It flows through three lines:
useSearchBulkActions.ts:2044—if (!allSelectedAreDeleted && !includesGroupExport)skips every custom and default export template.useSearchBulkActions.ts:2073— theelse if (!isGroupedSearch)basic-export fallback is also skipped, because this is a grouped search.useSearchBulkActions.ts:2032survives, so atuseSearchBulkActions.ts:2092the one-item submenu collapses into the parent button and takes over its label.Selecting the line items one by one works because toggling any individual row clears the group tag at
SearchWriteActionsProvider.tsx:436-437, which makesincludesGroupExportfalse and brings the full template submenu back.All four Accounting views named in the report (card accruals, cash accruals, card statements, bank reconciliation) are
type: expensewith agroupBy— seeSearchUIUtils.ts:901-985— so they always take this path.What changes do you think we should make in order to solve the problem?
Stop using
includesGroupExportto hide the export templates inuseSearchBulkActions.ts:2044. Group selections already export correctly —handleCSVExportandbeginExportWithTemplateboth convert a group selection into a query filter viaaddSelectedGroupsFilter(useSearchBulkActions.ts:186, used at:846-863and:979-995) — so the templates work; they are just not offered.The existing
!isGroupedSearchguards at:1779and:2073keep the basic CSV export hidden on grouped searches, which is the documented intent (it carries fewer columns than "Current view"). That part should stay.Worth confirming with the product owner first: is "no templates for a group selection" intentional, or collateral from moving group export onto the query-filter path? If it is intentional, the fix moves to
:2092— don't let a single sub-item silently rename the "Export" parent row.What alternative solutions did you explore? (Optional)
Alternatives considered and ruled out
getExportTemplatesatsrc/libs/actions/Search.ts:2001-2003always seeds at least the expense-level export, independent of policy. So a missingpolicy(the group pseudo-entry resolves topolicyID: _FAKE_) cannot empty the list.exportButtonOptionbeing dropped. Ruled out. It is pushed unconditionally atuseSearchBulkActions.ts:2394and there is noifanywhere that removes it. The row is present — only its label is wrong.isReportsTab(:1824), which is false on all fourtype: expenseAccounting views regardless of how you select.:2092. Renaming the row back to "Export" would restore the label but still offer just one export destination, which doesn't match "Export To > select export option" in the expected result.Two selection shapes exist, and both trip the same flag. A collapsed group with no children loaded stores one
group_<id>stub (SearchWriteActionsProvider.tsx:463-476); an expanded group stores one entry per child taggedisSelectedViaGroup: true(:519).isGroupSelectionat:182-184matches both, so a fix must cover both.Separate quirk found while tracing (not part of this bug). Select a group while it is collapsed, then expand it: the reconcile at
SearchWriteActionsProvider.tsx:214-215keepsgroupKeybut losesisSelectedViaGroup, so the same user action ends in two different states depending on expand order.Verification status. This is traced from code, not a live repro — the browser test session never rendered, so I could not confirm the exact rendered label. The claim to check first is that the row reads "Current view" rather than "Export ›".
Related issues
Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/100074)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
view run
melvin-bot commentedon Sep 1, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @eVoloshchak (
External)melvin-bot commentedon Sep 1, 2026
Unable to auto-create job on Upwork. The BZ team member should create it manually for this issue.
Anthgg commentedon Sep 4, 2026
Proposal
What is the root cause of that problem?
In
src/hooks/useSearchBulkActions.ts:2044,includesGroupExportis computed:And on line 2062:
When a group of expenses is selected in a grouped search view (such as the Accounting views: card accruals, cash accruals, card statements, or bank reconciliation),
includesGroupExportevaluates totrue.As a result:
exportOptions.exportOptionsonly contains a single item:Current view(pushed at line 2049).exportOptions.length === 1, the bulk actions menu collapses the single submenu option into the parent button, replacing the "Export To" / "Export" menu button with the direct label "Current view".Group selections already support template exports via
beginExportWithTemplateandhandleCSVExport, which properly convert group selections into query filters viaaddSelectedGroupsFilter(useSearchBulkActions.ts:186,:846-863,:979-995). However,!includesGroupExportat line 2062 still prevents these templates from being populated.What changes do you think we should make in order to solve the problem?
In
src/hooks/useSearchBulkActions.ts:!includesGroupExportcheck from line 2062:This allows the available default and custom export templates to be pushed into
exportOptionsfor group selections, preserving the full "Export To" menu and its sub-options.Keep the existing
!isGroupedSearchguard inavailableDefaultTemplates/handleBasicExport(useSearchBulkActions.ts:1779,:2073) so that basic CSV export continues to be hidden on grouped searches where "Current view" is preferred.Add a unit test in
SearchBulkActionsTestconfirming that selecting a grouped transaction row populatesexportOptionswith bothCurrent viewand the available export templates.What alternative solutions did you explore? (Optional)
exportOptions.length === 1: Rejected because while it fixes the parent label, it still only offers a single option ("Current view") without making the export templates available for group selections.melvin-bot commentedon Sep 4, 2026
@eVoloshchak Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
melvin-bot commentedon Sep 5, 2026
@eVoloshchak Whoops! This issue is 2 days overdue. Let's get this updated quick!
eVoloshchak commentedon Sep 7, 2026
@MelvinBot, implement this
MelvinBot commentedon Sep 7, 2026
🤖 Draft PR created: #100520
Please mark it as "Ready for review" when it is ready for review.
What changed: removed the
includesGroupExportgate insrc/hooks/useSearchBulkActions.ts, so selecting a group row on a grouped search now offers the export templates instead of leaving "Current view" as the only option.Why this is safe
That flag came from #88577, when a collapsed group stub carried no transaction IDs to export. Group selections are now exported through a query filter instead —
addSelectedGroupsFilter, which bothhandleCSVExportandbeginExportWithTemplatealready apply — so the templates work for a group selection; they were just never offered.The basic export stays hidden on grouped searches. That is gated separately on
!isGroupedSearch(it carries fewer columns than "Current view") and this PR does not touch it.Both selection shapes are covered by new unit tests: a collapsed group stored as a single
group_<id>stub, and an expanded group stored as one entry per child taggedisSelectedViaGroup.Tests run
npm test -- tests/unit/hooks/useSearchBulkActionsExportTest.ts— 34 passednpm test -- --silent tests/unit/hooks/useSearchBulkActions tests/unit/Search— 55 suites, 1622 tests passednpm run lint-changed,npm run typecheck, spell check — all passedmain(9 babel / 8 oxc errors) and the counts are identical after the change, so no regressionNot run: browser verification. The test session rendered a blank page after sign-in, so the flow could not be driven end to end. Manual test steps are in the PR for a human pass.
One thing worth confirming during review: the proposal flagged a possible product question — whether hiding templates for a group selection was ever intentional. Nothing in the code or the originating PR suggests it was, so I implemented the proposal as written.
Three issues look like they may share this root cause and could be worth deduping: #99089, #97217, and #98911.
16 remaining items
[-]Unable to see "export To" when selecting group of expenses[/-][+][$175] Unable to see "export To" when selecting group of expenses[/+]melvin-bot commentedon Sep 30, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022105325200090981358
JS00001 commentedon Oct 12, 2026
still in review
melvin-bot commentedon Oct 15, 2026
This issue has not been updated in over 15 days. @eVoloshchak, @JS00001 eroding to Monthly issue.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
JS00001 commentedon Oct 16, 2026
Merged
[-][$175] Unable to see "export To" when selecting group of expenses[/-][+][Due for payment 2026-10-23] [$175] Unable to see "export To" when selecting group of expenses[/+]melvin-bot commentedon Oct 16, 2026
@eVoloshchak
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.12-1 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 2026-10-23. 🎊
The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ 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]. If no checklist is needed for this issue, you can click: [no checklist button]
melvin-bot commentedon Oct 19, 2026
@eVoloshchak Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
melvin-bot commentedon Oct 21, 2026
@eVoloshchak Huh... This is 4 days overdue. Who can take care of this?