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 - Report closes after duplicating per diem expense #82274
Version Number: 9.3.18-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:#78792 Email or phone of affected tester (no customers):sjoijsnonisnjidosd@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac App Component: Money Requests
Action Performed:
Precondition:
Workspace has per diem rates.
Go to staging.new.expensify.com
Go to workspace chat.
Click + > Create expense > Per diem.
Create a per diem expense.
Open the report.
Click More > Duplicate.
Expected Result:
Report will not close after duplicating per diem expense.
👋 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.
Classification: Frontend bug Causing PR: #78792 - "[Duplicate Expenses] Add Per Diem Expense Support" by @jjcoffee (High confidence) Related Issues: #76829
Recommendation: ROLL FORWARD
The bug is caused by the duplicate per diem flow incorrectly inheriting the isFromGlobalCreate field from the original transaction. When this field is true, it triggers navigation logic in handleNavigateAfterExpenseCreate() that dismisses the report after duplication, regardless of where the duplicate action was initiated.
The fix is straightforward: explicitly set isFromGlobalCreate: false in the transactionParams when duplicating per diem expenses (similar to how other transaction fields like created are explicitly set to new values). This is a small, targeted change that should be safer than reverting the entire per diem duplicate feature.
Labels: No label changes needed. Keep DeployBlockerCash since this is a frontend bug affecting the App.
📋 Detailed Analysis
Evidence
PR #78792 added per diem expense duplication support. The bug reproduces exactly as described:
Create a per diem expense
Open the expense report
Click More > Duplicate
Bug: Report closes immediately after clicking Duplicate
This only affects per diem expenses - regular expense duplication works correctly.
Verification
The PR modifies these key files:
src/libs/actions/IOU/Duplicate.ts - Added per diem duplication logic (lines 643-655)
src/components/MoneyReportHeader.tsx - Added per diem duplicate handling
src/components/MoneyRequestHeader.tsx - Added per diem duplicate handling
The affected code paths are:
Duplicate.ts line 654: Calls submitPerDiemExpense(perDiemParams)
index.ts line 6865: submitPerDiemExpense() calls handleNavigateAfterExpenseCreate({activeReportID, transactionID: transaction.transactionID, isFromGlobalCreate})
index.ts lines 1117-1127: handleNavigateAfterExpenseCreate() checks isFromGlobalCreate and calls dismissModalAndOpenReportInInboxTab() which closes the report
Root Cause
In Duplicate.ts line 554, the code spreads the original transaction into transactionParams:
transactionParams: {
...transactionWithoutLinkedAction,// This includes isFromGlobalCreate from original
...transactionDetails,// ... other overrides}
When the original per diem was created from the global create button, isFromGlobalCreate: true gets copied to the duplicate. This causes handleNavigateAfterExpenseCreate() to dismiss the report, even though the user initiated the duplicate from within an open report (not from global create).
The fix is to explicitly set isFromGlobalCreate: false in the per diem duplication flow at Duplicate.ts line 646-650, similar to how created is explicitly set to the current date.
Activity
melvin-bot commentedon Feb 12, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #78792
melvin-bot commentedon Feb 12, 2026
💬 A slack conversation has been started in #expensify-open-source
melvin-bot commentedon Feb 12, 2026
Triggered auto assignment to @RachCHopkins (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.github-actions commentedon Feb 12, 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:
OSBotify commentedon Feb 12, 2026
🔍 Investigation Summary
Classification: Frontend bug
Causing PR: #78792 - "[Duplicate Expenses] Add Per Diem Expense Support" by @jjcoffee (High confidence)
Related Issues: #76829
Recommendation: ROLL FORWARD
The bug is caused by the duplicate per diem flow incorrectly inheriting the
isFromGlobalCreatefield from the original transaction. When this field istrue, it triggers navigation logic inhandleNavigateAfterExpenseCreate()that dismisses the report after duplication, regardless of where the duplicate action was initiated.The fix is straightforward: explicitly set
isFromGlobalCreate: falsein thetransactionParamswhen duplicating per diem expenses (similar to how other transaction fields likecreatedare explicitly set to new values). This is a small, targeted change that should be safer than reverting the entire per diem duplicate feature.Labels: No label changes needed. Keep
DeployBlockerCashsince this is a frontend bug affecting the App.📋 Detailed Analysis
Evidence
PR #78792 added per diem expense duplication support. The bug reproduces exactly as described:
This only affects per diem expenses - regular expense duplication works correctly.
Verification
The PR modifies these key files:
src/libs/actions/IOU/Duplicate.ts- Added per diem duplication logic (lines 643-655)src/components/MoneyReportHeader.tsx- Added per diem duplicate handlingsrc/components/MoneyRequestHeader.tsx- Added per diem duplicate handlingThe affected code paths are:
Duplicate.tsline 654: CallssubmitPerDiemExpense(perDiemParams)index.tsline 6865:submitPerDiemExpense()callshandleNavigateAfterExpenseCreate({activeReportID, transactionID: transaction.transactionID, isFromGlobalCreate})index.tslines 1117-1127:handleNavigateAfterExpenseCreate()checksisFromGlobalCreateand callsdismissModalAndOpenReportInInboxTab()which closes the reportRoot Cause
In
Duplicate.tsline 554, the code spreads the original transaction intotransactionParams:When the original per diem was created from the global create button,
isFromGlobalCreate: truegets copied to the duplicate. This causeshandleNavigateAfterExpenseCreate()to dismiss the report, even though the user initiated the duplicate from within an open report (not from global create).The fix is to explicitly set
isFromGlobalCreate: falsein the per diem duplication flow atDuplicate.tsline 646-650, similar to howcreatedis explicitly set to the current date.9 remaining items
RachCHopkins commentedon Feb 16, 2026
So what's the next steps here?
jjcoffee commentedon Feb 16, 2026
I'll handle it in #82005
melvin-bot commentedon Feb 19, 2026
@jjcoffee, @RachCHopkins, @JS00001 Whoops! This issue is 2 days overdue. Let's get this updated quick!
JS00001 commentedon Feb 19, 2026
Closing since this was a deploy blocker, @jjcoffee is working on a fix though
melvin-bot commentedon Mar 4, 2026
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.
melvin-bot commentedon Mar 5, 2026
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.