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-06-16] [Due for payment 2026-06-12] Expense - Expense report does not open after changing report and creating expense #92641
Version Number: 9.3.99-0 Reproducible in staging?: Yes Reproducible in production?: No If this was caught during regression testing, add the test name, ID and link from BrowserStack:#91266 Email or phone of affected tester (no customers):jojsonsjosjdosij@gmail.com 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 empty reports and rename them to A and B.
Click + > Create expense > Manual.
Enter amount > Next.
On confirm page, enter merchant and click Report field.
Select report A.
Click Create expense.
Expected Result:
Report A will open after changing report and creating expense.
Actual Result:
Report A does not open after changing report and creating expense.
This issue also happens when user selects Create report in Step 7 instead of selecting existing report.
👋 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.
Regression from #91266 (fix for #91093). Staging-only, matching "Reproducible in production?: No".
What is the root cause of that problem?
When you create an expense from the workspace chat and explicitly pick a destination report (select report A, or Create report) on the confirmation page, the app reveals the parent workspace chat after submit instead of the report you chose.
After you select report A, report becomes that expense (money-request) report, so isMRReport is true. Because you are still viewing the workspace chat behind the RHP, getTopmostReportId() is the workspace chat, not report A — so the new branch resolves destinationReportID to report.chatReportID (the workspace chat) instead of report A. destinationReportID is exactly what gets revealed after submit, so you land on the workspace chat. Create report hits the same branch (the new report is also a money-request report).
The PR's intent (per fix: per diem from report preview lands on workspace chat #91266 description) was to fix per-diem launched from a report preview's Add expense, where backToReport (the workspace chat) should be set but gets dropped by the per-diem step screens. As a workaround the PR inferred the chat from report.chatReportID whenever report is a money-request report the user isn't currently viewing.
That heuristic is too broad: in the global-create / explicit-selection flow the user is never viewing the chosen expense report, yet they explicitly want to open it. So the workaround mis-fires and redirects to the parent chat.
Confirmed the per-diem steps drop backToReport: IOURequestStepDestination.tsx, IOURequestStepTime.tsx, IOURequestStepSubrate.tsx contain no reference to backToReport, so it is undefined by the time confirmation renders — which is the real bug the PR was working around.
Staging-only (PR merged to staging 2026-06-03, issue filed 2026-06-04), consistent with the report.
What changes do you think we should make in order to solve the problem?
Immediate (deploy blocker): revert #91266. The issue it fixed (#91093 — an expense report opening when it shouldn't) is lower severity than this regression (an explicitly-chosen report failing to open).
Proper re-fix: address the actual cause the PR identified instead of inferring the chat from report. Propagate backToReport through the per-diem step screens (STEP_DESTINATION, STEP_TIME, STEP_SUBRATE) so it reaches IOURequestStepConfirmation, then restore destinationReportID to backToReport ?? report?.reportID ?? selfDMReportID. This fixes per-diem-from-preview without the chatReportID heuristic that breaks explicit report selection.
What alternative solutions did you explore? (Optional)
Narrowly gate the chatReportID fallback to the per-diem path only (so Manual/Scan/Distance keep their pre-PR behavior of opening the selected report). This is smaller but still leaves per-diem unable to honor an explicitly-selected report on the confirm page, so the backToReport propagation above is preferred.
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/92641) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
In the repro (workspace chat → + → Manual → amount → on the confirm page change Report to A → Create expense):
backToReport is undefined (Manual from the workspace chat doesn't set it).
After picking Report A, report is the expense report A, so isMRReport is true.
The workspace chat is still the topmost report behind the RHP, so getTopmostReportId() !== report.reportID is true.
The new branch resolves destinationReportID to report.chatReportID — Report A's parent workspace chat — instead of Report A.
destinationReportID is what the pre-insert and submit-dismiss flows reveal (see SubmitExpenseOrchestrator.tsx:294), so the user lands back on the workspace chat. Selecting Create report in step 7 hits the same branch because the new report is also a money-request report.
The heuristic was added to handle a different flow — per diem launched from a report preview's Add expense (issue #91093) — where backToReportshould be the workspace chat but is dropped by the per-diem step screens (STEP_DESTINATION, STEP_TIME, STEP_SUBRATE don't carry it). The heuristic recovered the chat from report.chatReportID as a workaround, but it wasn't scoped to per-diem, so Manual / Scan / Distance now fall into the same branch and lose the user's explicit report selection.
What changes do you think we should make in order to solve the problem?
Gate the heuristic on per diem only. isPerDiemRequest is already in scope at line 144 of the same file, so the change is a single added condition:
The matching backToReport ?? activeReportID change in useExpenseSubmission.ts:568 lives inside submitPerDiemExpense (defined at line 475) and never runs for Manual / Scan / Distance, so it does not need to change for this fix.
What alternative solutions did you explore? (Optional)
Propagate backToReport through the per-diem step screens. Add backToReport to the navigation params for STEP_DESTINATION, STEP_TIME, STEP_SUBRATE, then drop the chatReportID heuristic entirely. This addresses the underlying cause that PR fix: per diem from report preview lands on workspace chat #91266 was working around. Touches three more files than the proposed fix, so it is better suited to a follow-up cleanup than to unblocking the deploy.
changed the title [-]Expense - Expense report does not open after changing report and creating expense[/-][+][Due for payment 2026-06-12] Expense - Expense report does not open after changing report and creating expense[/+]on Jun 5, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.99-9 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@brunovjk The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero 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]
changed the title [-][Due for payment 2026-06-12] Expense - Expense report does not open after changing report and creating expense[/-][+][Due for payment 2026-06-16] [Due for payment 2026-06-12] Expense - Expense report does not open after changing report and creating expense[/+]on Jun 9, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.0-7 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@brunovjk The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero 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]
@mkhutornyi plz include the bz checklist in the future, even for instances like these (so I don't have to dig around to find out what's up before paying).
@brunovjk plz try to be more punctual on regressions you're responsible for (I think that's what happened here...)
Activity
applause-bot commentedon Jun 4, 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/e14aebfef763c245365073cc30ec27f82c0b9e92c5be8c828295aa8561e11988
melvin-bot commentedon Jun 4, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #91266
melvin-bot commentedon Jun 4, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Jun 4, 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:
MelvinBot commentedon Jun 4, 2026
Proposal
What is the root cause of that problem?
When you create an expense from the workspace chat and explicitly pick a destination report (select report A, or Create report) on the confirmation page, the app reveals the parent workspace chat after submit instead of the report you chose.
PR #91266 changed how
destinationReportIDis computed inIOURequestStepConfirmation.tsx:482:After you select report A,
reportbecomes that expense (money-request) report, soisMRReportistrue. Because you are still viewing the workspace chat behind the RHP,getTopmostReportId()is the workspace chat, not report A — so the new branch resolvesdestinationReportIDtoreport.chatReportID(the workspace chat) instead of report A.destinationReportIDis exactly what gets revealed after submit, so you land on the workspace chat. Create report hits the same branch (the new report is also a money-request report).Evidence — why this is the regression
destinationReportID:SubmitExpenseOrchestrator.tsx:294(handleDismissToReport→revealRouteBeforeDismissingModal(REPORT_WITH_ID.getRoute(destinationReportID))).backToReport(the workspace chat) should be set but gets dropped by the per-diem step screens. As a workaround the PR inferred the chat fromreport.chatReportIDwheneverreportis a money-request report the user isn't currently viewing.backToReport:IOURequestStepDestination.tsx,IOURequestStepTime.tsx,IOURequestStepSubrate.tsxcontain no reference tobackToReport, so it isundefinedby the time confirmation renders — which is the real bug the PR was working around.What changes do you think we should make in order to solve the problem?
Immediate (deploy blocker): revert #91266. The issue it fixed (#91093 — an expense report opening when it shouldn't) is lower severity than this regression (an explicitly-chosen report failing to open).
Proper re-fix: address the actual cause the PR identified instead of inferring the chat from
report. PropagatebackToReportthrough the per-diem step screens (STEP_DESTINATION,STEP_TIME,STEP_SUBRATE) so it reachesIOURequestStepConfirmation, then restoredestinationReportIDtobackToReport ?? report?.reportID ?? selfDMReportID. This fixes per-diem-from-preview without thechatReportIDheuristic that breaks explicit report selection.What alternative solutions did you explore? (Optional)
Narrowly gate the
chatReportIDfallback to the per-diem path only (so Manual/Scan/Distance keep their pre-PR behavior of opening the selected report). This is smaller but still leaves per-diem unable to honor an explicitly-selected report on the confirm page, so thebackToReportpropagation above is preferred.Related issues
Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/92641)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
lakchote commentedon Jun 4, 2026
@MobileMage seems to be coming from #91266 can you take a look please?
MobileMage commentedon Jun 4, 2026
Yup this was from an oversight, working on a PR with fix.
MobileMage commentedon Jun 4, 2026
Proposal
What is the root cause of that problem?
PR #91266 changed how
destinationReportIDis computed inIOURequestStepConfirmation.tsx:482:backToReport ?? report?.reportID ?? selfDMReportIDbackToReport ?? (isMRReport && getTopmostReportId() !== report?.reportID ? report?.chatReportID : report?.reportID) ?? selfDMReportIDIn the repro (workspace chat →
+→ Manual → amount → on the confirm page change Report to A → Create expense):backToReportisundefined(Manual from the workspace chat doesn't set it).reportis the expense report A, soisMRReportistrue.getTopmostReportId() !== report.reportIDistrue.destinationReportIDtoreport.chatReportID— Report A's parent workspace chat — instead of Report A.destinationReportIDis what the pre-insert and submit-dismiss flows reveal (seeSubmitExpenseOrchestrator.tsx:294), so the user lands back on the workspace chat. Selecting Create report in step 7 hits the same branch because the new report is also a money-request report.The heuristic was added to handle a different flow — per diem launched from a report preview's Add expense (issue #91093) — where
backToReportshould be the workspace chat but is dropped by the per-diem step screens (STEP_DESTINATION,STEP_TIME,STEP_SUBRATEdon't carry it). The heuristic recovered the chat fromreport.chatReportIDas a workaround, but it wasn't scoped to per-diem, so Manual / Scan / Distance now fall into the same branch and lose the user's explicit report selection.What changes do you think we should make in order to solve the problem?
Gate the heuristic on per diem only.
isPerDiemRequestis already in scope at line 144 of the same file, so the change is a single added condition:destinationReportID = backToReport ?? (isPerDiemRequest && isMRReport && getTopmostReportId() !== report?.reportID ? report?.chatReportID : report?.reportID) ?? selfDMReportIDAfter this:
report?.reportIDexactly as they did before PR fix: per diem from report preview lands on workspace chat #91266, so the explicitly selected Report A is opened.chatReportIDbranch, so the original fix is preserved.The matching
backToReport ?? activeReportIDchange inuseExpenseSubmission.ts:568lives insidesubmitPerDiemExpense(defined at line 475) and never runs for Manual / Scan / Distance, so it does not need to change for this fix.What alternative solutions did you explore? (Optional)
Revert PR fix: per diem from report preview lands on workspace chat #91266. Smallest diff, but reopens issue [Due for payment 2026-06-12] [$250] Per diem - Expense report opens after creating distance expense from report preview #91093 (per diem from a report preview opens the expense report instead of staying on the workspace chat). The regression and the original bug are roughly equal severity, so a revert just trades one bug for the other.
Propagate
backToReportthrough the per-diem step screens. AddbackToReportto the navigation params forSTEP_DESTINATION,STEP_TIME,STEP_SUBRATE, then drop thechatReportIDheuristic entirely. This addresses the underlying cause that PR fix: per diem from report preview lands on workspace chat #91266 was working around. Touches three more files than the proposed fix, so it is better suited to a follow-up cleanup than to unblocking the deploy.10 remaining items
brunovjk commentedon Jun 5, 2026
Sorry for the delay, thank you for resolving this.
[-]Expense - Expense report does not open after changing report and creating expense[/-][+][Due for payment 2026-06-12] Expense - Expense report does not open after changing report and creating expense[/+]melvin-bot commentedon Jun 5, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Jun 5, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.99-9 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-06-12. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Jun 5, 2026
@brunovjk The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero 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]
mkhutornyi commentedon Jun 7, 2026
This was closed without C+ payment.
@lakchote can you please reopen?
brunovjk commentedon Jun 8, 2026
Update: This issue stems from a regression from this PR. The C+ @mkhutornyi reviewed this PR, which fixed the regression.
[-][Due for payment 2026-06-12] Expense - Expense report does not open after changing report and creating expense[/-][+][Due for payment 2026-06-16] [Due for payment 2026-06-12] Expense - Expense report does not open after changing report and creating expense[/+]melvin-bot commentedon Jun 9, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.0-7 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-06-16. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Jun 9, 2026
@brunovjk The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero 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]
mkhutornyi commentedon Jun 15, 2026
@mallenexpensify can you please help with payment? Thanks
mallenexpensify commentedon Jun 17, 2026
Payment Summary
Contributor+: @mkhutornyi due $250 via NewDot
@mkhutornyi plz include the bz checklist in the future, even for instances like these (so I don't have to dig around to find out what's up before paying).
@brunovjk plz try to be more punctual on regressions you're responsible for (I think that's what happened here...)
trjExpensify commentedon Jun 23, 2026
approved $250 for @mkhutornyi