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
Expense - Expense is not duplicated in source report when it is duplicated via bulk select #103866
Version Number: 9.5.8-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:#103072 Email or phone of affected tester (no customers):[email protected] 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:
Go to staging.new.expensify.com
Go to workspace chat.
Create two reports with an expense each.
Open the first report.
Click More > Duplicate expense.
→ The expense is duplicated in the source report - Expected.
Bulk select one of the expenses.
Click More > Duplicate expense.
Expected Result:
Expense will be duplicated in source report when it is duplicated via bulk select.
Actual Result:
Expense is not duplicated in source report when it is duplicated via bulk select.
It is duplicated in the newest report instead.
👋 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.
Recommendation: Demote, not revert. This is not a regression. Bulk duplicate already sends the copy to the newest report in production (9.5.7-3).
Keep duplicated expenses on the source report when it can accept them (Expensify/App#103072) changed only the single-expense duplicate paths, which step 5 confirms work. Its description says bulk duplicate was left out of scope for a follow-up. That follow-up never shipped, so the two entry points now behave differently.
Reverting would undo the working single-expense fix and would not change bulk duplicate.
Root cause: Bulk duplicate always targets the default workspace chat, so the copy lands on the report that chat's iouReportID points to, which is the newest report. The target is set in useBulkDuplicateAction.ts:78-94. Production has the same targetReport: activePolicyExpenseChat line.
In useBulkDuplicateAction, check that every selected expense belongs to that source report and that canDuplicateExpenseIntoSourceReport returns true. If both hold, target the source report and its policy, including categories, tags, and participants. Otherwise, keep the current routing. Search-page bulk duplicate passes no source report, so it stays unchanged.
In bulkDuplicateExpenses, stop patching iouReportID onto the target when it is an expense report (Duplicate.ts:1397, Duplicate.ts:1450-1451). That code assumes the target is a chat.
Add a DuplicateTest case that calls bulkDuplicateExpenses with an open expense report as the target.
From the PR description: "Bulk duplicate from the search selection toolbar (useBulkDuplicateAction) is out of scope. Its iouReportID handling in Duplicate.ts assumes the target is a chat, so it is better handled as a follow-up."
No other PR on the current staging checklist touches the bulk duplicate files.
Activity
applause-bot commentedon Oct 13, 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/b5e2b9cea44b3de3fdbaa214a19f51e6479cb41a63b78f60fe8ae46408c78e9d
melvin-bot commentedon Oct 13, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #103072
github-actions commentedon Oct 13, 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:
melvin-bot commentedon Oct 13, 2026
@NikkiWines @francoisl @thelullabyy you have been assigned to this deploy blocker because you reviewed the offending PR: #103072
melvin-bot commentedon Oct 13, 2026
💬 A slack conversation has been started in #expensify-open-source
MelvinBot commentedon Oct 13, 2026
Deploy Blocker Investigation
Recommendation: Demote, not revert. This is not a regression. Bulk duplicate already sends the copy to the newest report in production (
9.5.7-3).Keep duplicated expenses on the source report when it can accept them (
Expensify/App#103072) changed only the single-expense duplicate paths, which step 5 confirms work. Its description says bulk duplicate was left out of scope for a follow-up. That follow-up never shipped, so the two entry points now behave differently.Reverting would undo the working single-expense fix and would not change bulk duplicate.
Root cause: Bulk duplicate always targets the default workspace chat, so the copy lands on the report that chat's
iouReportIDpoints to, which is the newest report. The target is set inuseBulkDuplicateAction.ts:78-94. Production has the sametargetReport: activePolicyExpenseChatline.Suggested follow-up fix:
MoneyReportHeaderSelectionDropdown.tsx:340andSelectionToolbar/index.tsx:256throughBulkDuplicateHandlerintouseBulkDuplicateAction.useBulkDuplicateAction, check that every selected expense belongs to that source report and thatcanDuplicateExpenseIntoSourceReportreturns true. If both hold, target the source report and its policy, including categories, tags, and participants. Otherwise, keep the current routing. Search-page bulk duplicate passes no source report, so it stays unchanged.bulkDuplicateExpenses, stop patchingiouReportIDonto the target when it is an expense report (Duplicate.ts:1397,Duplicate.ts:1450-1451). That code assumes the target is a chat.DuplicateTestcase that callsbulkDuplicateExpenseswith an open expense report as the target.Investigation details
useSelectedTransactionsActions, thenBulkDuplicateHandler, thenuseBulkDuplicateAction, thenbulkDuplicateExpenses. Keep duplicated expenses on the source report when it can accept them #103072 changed none of these files.useExpenseActions.ts:182(report header) andMoneyRequestHeaderSecondaryActions.tsx:242(expense header).useBulkDuplicateAction) is out of scope. ItsiouReportIDhandling inDuplicate.tsassumes the target is a chat, so it is better handled as a follow-up."Next Steps: Reply with
@MelvinBot implement thisto create a draft PR for the follow-up, or@MelvinBot <your feedback>to refine this analysis.melvin-bot commentedon Oct 16, 2026
@francoisl, @NikkiWines, @thelullabyy Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
melvin-bot commentedon Oct 20, 2026
@francoisl, @NikkiWines, @thelullabyy Still overdue 6 days?! Let's take care of this!
melvin-bot commentedon Oct 22, 2026
@francoisl, @NikkiWines, @thelullabyy Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it!