Skip to content

Expense - Expense is not duplicated in source report when it is duplicated via bulk select #103866

Open

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

  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Create two reports with an expense each.
  4. Open the first report.
  5. Click More > Duplicate expense.
    → The expense is duplicated in the source report - Expected.
  6. Bulk select one of the expenses.
  7. 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.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7285236_1791890520813.7.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Nathan Lemma
Bug ID: 7285236

Activity

  1. applause-bot commented on Oct 13, 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/b5e2b9cea44b3de3fdbaa214a19f51e6479cb41a63b78f60fe8ae46408c78e9d

  2. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Oct 13, 2026
  3. melvin-bot commented on Oct 13, 2026

    @melvin-bot

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

  4. github-actions commented on Oct 13, 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.
  5. melvin-bot commented on Oct 13, 2026

    @melvin-bot

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

  6. melvin-bot commented on Oct 13, 2026

    @melvin-bot

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

  7. MelvinBot commented on Oct 13, 2026

    @MelvinBot
    Contributor

    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 iouReportID points to, which is the newest report. The target is set in useBulkDuplicateAction.ts:78-94. Production has the same targetReport: activePolicyExpenseChat line.

    Suggested follow-up fix:

    1. Pass the source report, its chat report, and its policy from MoneyReportHeaderSelectionDropdown.tsx:340 and SelectionToolbar/index.tsx:256 through BulkDuplicateHandler into useBulkDuplicateAction.
    2. 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.
    3. 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.
    4. Add a DuplicateTest case that calls bulkDuplicateExpenses with an open expense report as the target.
    Investigation details

    Next Steps: Reply with @MelvinBot implement this to create a draft PR for the follow-up, or @MelvinBot <your feedback> to refine this analysis.

  8. added and removed
    DeployBlockerCashThis issue or pull request should block deployment
    on Oct 13, 2026
  9. melvin-bot commented on Oct 16, 2026

    @melvin-bot

    @francoisl, @NikkiWines, @thelullabyy Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  10. melvin-bot commented on Oct 20, 2026

    @melvin-bot

    @francoisl, @NikkiWines, @thelullabyy Still overdue 6 days?! Let's take care of this!

  11. melvin-bot commented on Oct 22, 2026

    @melvin-bot

    @francoisl, @NikkiWines, @thelullabyy Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it!

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.DailyKSv2EngineeringOverdue

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions