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-07-28] [Merge Reports][FE] mergeReports() action + optimistic data + Constants + command types #94872
Add the constants and command types that the merge action and bulk-action menu depend on.
CONST.SEARCH.BULK_ACTION_TYPES.MERGE_REPORTS — namespaced under SEARCH, matching the existing bulk-action constants.
WRITE_COMMANDS.MERGE_REPORTS: 'MergeReports' in src/libs/API/types.ts.
MergeReportsParams in WriteCommandParameters:
destinationReportID: string
sourceReportIDs: string[] (a real array, derived as selected minus destination — not a JSON-stringified string)
Notes
Small and mechanical. The param shape must match the backend MergeReports command (#92950)
mergeReports() action + optimistic data
Scope
Add the mergeReports(destinationReportID, sourceReportIDs) action that fires WRITE_COMMANDS.MERGE_REPORTS with optimistic data.
Reuse the optimistic-data helpers from changeTransactionsReport() in src/libs/actions/Transaction.ts rather than reimplementing "move + delete empty" in Report.ts. That function already moves transactions, updates source totals/counts, manages transaction threads, and tracks staleReportIDs.
Optimistic data: move every transaction from each source report into the destination, then mark each emptied source report as deleted (comments included).
Include ONYXKEYS.COLLECTION.SNAPSHOT updates.
The actual move + delete of empty source reports is performed by the backend MergeReports command — this action only builds the FE optimistic/success/failure data and calls the command.
Splits — confirmed non-issue
Split expenses are preserved through the merge: the split link lives on transaction data (comment.originalTransactionID), not on the source report, as long as the move goes through the same backend path ChangeTransactionsReport already uses. No special handling needed.
Tests
Unit + snapshot tests, including the empty-source-report deletion.
Dependencies
Backend MergeReports command (response shape to reconcile against).
Constants + command types, above.
Part of the Merge Reports project — discussed in Slack.
Activity
[-][Merge Reports][FE] `mergeReports()` action + optimistic data[/-][+][Merge Reports][FE] `mergeReports()` action + optimistic data + Constants + command types[/+]melvin-bot commentedon Jul 2, 2026
@situchan Whoops! This issue is 2 days overdue. Let's get this updated quick!
melvin-bot commentedon Jul 3, 2026
@situchan Whoops! This issue is 2 days overdue. Let's get this updated quick!
melvin-bot commentedon Jul 3, 2026
@situchan Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
11 remaining items
melvin-bot commentedon Jul 27, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)melvin-bot commentedon Jul 27, 2026
Payment Summary
Upwork Job
BugZero Checklist (@mallenexpensify)
situchan commentedon Jul 30, 2026
@mallenexpensify payment will be handled in parent issue
mallenexpensify commentedon Jul 30, 2026
Deleted payment summary