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-01-20] [$250] Expense report - Rejected expense is displayed duplicated in the report #76982
Version Number: v9.2.73-0 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from BrowserStack:#71438 Email or phone of affected tester (no customers):ndk.2303+130@gmail.com Issue reported by: Applause Internal Team Bug source: Regression TC Execution Device used: Windows 11 Home/Chrome App Component: Money Requests
Please re-state the problem that we are trying to solve in this issue.
When a rejected expense is moved to a new report, navigating to that report displays the expense twice as report preview instead of showing a single expense detail view.
What is the root cause of that problem?
When an expense is rejected from a report with multiple expenses, a report preview action is created in the workspace chat (policyExpenseChat). However, this report preview action is incorrectly being included in the expense report's own report actions when it should only exist in the workspace chat.
The getCombinedReportActions function filters out CREATE and TRACK actions from money request reports, but it does not filter out REPORT_PREVIEW actions. Report preview actions should only be displayed in workspace chats (parentReportID), not in expense reports themselves. When a rejected expense report contains a report preview action, it causes the expense to be displayed twice - once as the actual transaction and once as the report preview action.
The Problem Flow:
1. Expense is rejected → moved to new report
2. Report preview action created in workspace chat (correct)
3. Report preview action also appears in expense report actions (incorrect)
4. When viewing expense report → shows transaction + report preview action
5. Result: Expense displayed twice as preview instead of single detail view ❌
What changes do you think we should make in order to solve the problem?
Filter out report preview actions from expense report actions in the getCombinedReportActions function. Report preview actions should only exist in workspace chats, not in expense reports (EXPENSE, IOU, or INVOICE type reports).
File: App/src/libs/ReportActionsUtils.ts
Update the getCombinedReportActions function to filter out report preview actions from money request reports:
constreport=allReports?.[`${ONYXKEYS.COLLECTION.REPORT}${reportID}`];constisSelfDM=report?.chatType===CONST.REPORT.CHAT_TYPE.SELF_DM;constisMoneyRequest=report?.type===CONST.REPORT.TYPE.EXPENSE||report?.type===CONST.REPORT.TYPE.IOU||report?.type===CONST.REPORT.TYPE.INVOICE;// Filter out request and send money request actions because we don't want to show any preview actions for one transaction reports// Also filter out report preview actions from money request reports (expense, IOU, invoice) as they should only exist in workspace chatsconstfilteredReportActions=[...filteredParentReportActions, ...filteredTransactionThreadReportActions].filter((action)=>{// Filter out report preview actions from money request reportsif(isMoneyRequest&&isReportPreviewAction(action)){returnfalse;}if(!isMoneyRequestAction(action)){returntrue;}constactionType=getOriginalMessage(action)?.type??'';if(isSelfDM){returnactionType!==CONST.IOU.REPORT_ACTION_TYPE.CREATE;}returnactionType!==CONST.IOU.REPORT_ACTION_TYPE.CREATE&&actionType!==CONST.IOU.REPORT_ACTION_TYPE.TRACK;});
Why this works:
Prevents duplicate display: Filters out report preview actions from expense reports, ensuring they only appear in workspace chats
Maintains correct view: Allows isSingleTransactionReport to correctly identify single-transaction reports, which enables the proper detail view
However, we do not set the createdIOUReportActionID parameter to the reportActionID of the iouAction. As a result, the reportActionID of the iouAction is not sent to the backend, and the backend defaults to creating a new iouAction with a different reportActionID. This leads to two valid iouActions existing in the report, which causes the current issue.
What changes do you think we should make in order to solve the problem?
changed the title [-]Expense report - Rejected expense is displayed duplicatedly in the report[/-][+]Expense report - Rejected expense is displayed duplicated in the report[/+]on Dec 8, 2025
changed the title [-]Expense report - Rejected expense is displayed duplicated in the report[/-][+][$250] Expense report - Rejected expense is displayed duplicated in the report[/+]on Dec 8, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.2.99-8 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@hoangzinh 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]
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: N/A
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:
Regression Test Proposal
Test:
Sign in to ND
Navigate to Workspace chat
Create 2 expenses in a report
Create a new empty report
Submit the report in Step 3
Navigate to 1 of 2 expenses created in Step 3
Reject the expense
Navigate to report contain the rejected expense
Verify that the report should display the single expense detail view of the rejected expense in step 7
Issue is ready for payment but no BZ is assigned. @johncschuster you are the lucky winner! Please verify the payment summary looks correct and complete the checklist. Thanks!
Activity
melvin-bot commentedon Dec 8, 2025
Triggered auto assignment to @sakluger (
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.abbasifaizan70 commentedon Dec 8, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a rejected expense is moved to a new report, navigating to that report displays the expense twice as report preview instead of showing a single expense detail view.
What is the root cause of that problem?
When an expense is rejected from a report with multiple expenses, a report preview action is created in the workspace chat (policyExpenseChat). However, this report preview action is incorrectly being included in the expense report's own report actions when it should only exist in the workspace chat.
The
getCombinedReportActionsfunction filters out CREATE and TRACK actions from money request reports, but it does not filter out REPORT_PREVIEW actions. Report preview actions should only be displayed in workspace chats (parentReportID), not in expense reports themselves. When a rejected expense report contains a report preview action, it causes the expense to be displayed twice - once as the actual transaction and once as the report preview action.The Problem Flow:
What changes do you think we should make in order to solve the problem?
Filter out report preview actions from expense report actions in the
getCombinedReportActionsfunction. Report preview actions should only exist in workspace chats, not in expense reports (EXPENSE, IOU, or INVOICE type reports).File:
App/src/libs/ReportActionsUtils.tsUpdate the
getCombinedReportActionsfunction to filter out report preview actions from money request reports:Why this works:
isSingleTransactionReportto correctly identify single-transaction reports, which enables the proper detail viewWhat alternative solutions did you explore? (Optional)
None
dmkt9 commentedon Dec 8, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Rejected expense is displayed twice in Report. The expenses are displayed as report preview instead of list
What is the root cause of that problem?
When there is an open report, the rejected expense will be moved into this report.
App/src/libs/actions/IOU.ts
Lines 13531 to 13561 in 3c1691d
At this, we create an optimistic
iouAction.App/src/libs/actions/IOU.ts
Line 13535 in 3c1691d
However, we do not set the
createdIOUReportActionIDparameter to thereportActionIDof theiouAction. As a result, thereportActionIDof theiouActionis not sent to the backend, and the backend defaults to creating a newiouActionwith a differentreportActionID. This leads to two validiouActions existing in the report, which causes the current issue.What changes do you think we should make in order to solve the problem?
We need to set
createdIOUReportActionID.App/src/libs/actions/IOU.ts
Line 13547 in 3c1691d
What alternative solutions did you explore? (Optional)
N/A
[-]Expense report - Rejected expense is displayed duplicatedly in the report[/-][+]Expense report - Rejected expense is displayed duplicated in the report[/+][-]Expense report - Rejected expense is displayed duplicated in the report[/-][+][$250] Expense report - Rejected expense is displayed duplicated in the report[/+]melvin-bot commentedon Dec 8, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021998091313374387693
melvin-bot commentedon Dec 8, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @hoangzinh (
External)31 remaining items
melvin-bot commentedon Jan 13, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Jan 13, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.2.99-8 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-01-20. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Jan 13, 2026
@hoangzinh 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]
sakluger commentedon Jan 20, 2026
Hey @dmkt9, please let me know once you've accepted the Upwork offer: https://www.upwork.com/nx/wm/offer/110163501
@hoangzinh please complete the BZ checklist by payment date tomorrow.
dmkt9 commentedon Jan 20, 2026
@sakluger Thank you. Payment requested.
hoangzinh commentedon Jan 20, 2026
BugZero Checklist:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: https://github.com/Expensify/App/pull/70960/files#r2708063196
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: N/A
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:
Regression Test Proposal
Test:
Do we agree 👍 or 👎
melvin-bot commentedon Jan 20, 2026
Issue is ready for payment but no BZ is assigned. @johncschuster you are the lucky winner! Please verify the payment summary looks correct and complete the checklist. Thanks!
sakluger commentedon Jan 21, 2026
Payment Summary
Contributor: @dmkt9 paid $250 via Upwork
Contributor+: @hoangzinh due $250 via Newdot
garrettmknight commentedon Jan 28, 2026
$250 approved for @hoangzinh