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 2025-07-22] [$250] Expense - LHN does not show report total after adding unreported expenses to the report #64563
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Version Number: 9.1.69-1 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from TestRail:https://expensify.testrail.io/index.php?/tests/view/6315066 Email or phone of affected tester (no customers):applausetester+sud90n@applause.expensifail.com Issue reported by: Applause Internal Team Device used: Mac 15.5 / Chrome App Component: Money Requests
Action Performed:
Precondition:
Account has self DM.
Go to staging.new.expensify.com
Go to self DM.
Submit two track expenses with merchant in self DM.
Go to workspace chat.
Click + > Create report.
Click Add expense > Add unreported expense.
Select the two track expenses from Step 3.
Click Add to report.
Expected Result:
Workspace chat preview in LHN will show the report total, which is the sum of the two track expenses.
Actual Result:
Workspace chat preview in LHN only shows the amount of one of the track expenses.
that might be wrong especially if the workspace has submit enabled and the report hasn't been submitted so we can consider returning some other copy for the case of containsNonReimbursable if the report status is 0 but the exact copy should be suggested by the internal team. (it can be tracked copy may be)
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
If needed we can add a test for getLastMessageTextForReport to assert that it returns the correct copy for report preview which contain tracked expenses.
What alternative solutions did you explore? (Optional)
changed the title [-]Expense - LHN does not show report total after adding unreported expenses to the report[/-][+][$250] Expense - LHN does not show report total after adding unreported expenses to the report[/+]on Jun 24, 2025
changed the title [-][$250] Expense - LHN does not show report total after adding unreported expenses to the report[/-][+][Due for payment 2025-07-22] [$250] Expense - LHN does not show report total after adding unreported expenses to the report[/+]on Jul 15, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.80-8 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@brunovjk@johncschuster 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]
1a. Result of the original design (eg. a case wasn't considered)
1b. Mistake during implementation
1c. Backend bug
1z. Other:
Where bug was reported:
2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
2b. Reported on staging (eg. found during regression or PR testing)
2d. Reported on a PR
2z. Other:
Who reported the bug:
3a. Expensify user
3b. Expensify employee
3c. Contributor
3d. QA
3z. Other:
[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:
[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:
[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.
Regression Test Proposal Template
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
[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:
[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.
Regression Test Proposal
Tests
Precondition:
Account has self DM.
Go to self DM.
Submit two track expenses with merchant in self DM.
Go to workspace chat.
Click + Create report.
Click Add expense Add unreported expense.
Select the two track expenses from Step 3.
Click Add to report.
Workspace chat preview in LHN will show the report total, which is the sum of the two track expenses.
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Activity
melvin-bot commentedon Jun 19, 2025
Triggered auto assignment to @johncschuster (
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.FitseTLT commentedon Jun 19, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Expense - LHN does not show report total after adding unreported expenses to the report
What is the root cause of that problem?
To get the last message text for report we pass the last iou action of the iou report here
App/src/libs/OptionsListUtils.ts
Lines 757 to 773 in 2fa04d3
and here we return tracking copy with the amount of the the iou tracked expense action
App/src/libs/ReportUtils.ts
Lines 4526 to 4544 in 2fa04d3
so we don't see the total amount
What changes do you think we should make in order to solve the problem?
We should avoid
isExpenseReportsjust like we are checking for!isIOUReporthereApp/src/libs/ReportUtils.ts
Line 4526 in 2fa04d3
If needed can consider adding the same condition for the split logic here too
On additional note: when we add unreported expenses the report will have non-reimbursable transactions so return spent copy here
App/src/libs/ReportUtils.ts
Lines 4637 to 4639 in 2fa04d3
that might be wrong especially if the workspace has submit enabled and the report hasn't been submitted so we can consider returning some other copy for the case of
containsNonReimbursableif the report status is0but the exact copy should be suggested by the internal team. (it can be tracked copy may be)What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
If needed we can add a test for
getLastMessageTextForReportto assert that it returns the correct copy for report preview which contain tracked expenses.What alternative solutions did you explore? (Optional)
melvin-bot commentedon Jun 23, 2025
@johncschuster Whoops! This issue is 2 days overdue. Let's get this updated quick!
[-]Expense - LHN does not show report total after adding unreported expenses to the report[/-][+][$250] Expense - LHN does not show report total after adding unreported expenses to the report[/+]melvin-bot commentedon Jun 24, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021937302836776083924
melvin-bot commentedon Jun 24, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @brunovjk (
External)24 remaining items
[-][$250] Expense - LHN does not show report total after adding unreported expenses to the report[/-][+][Due for payment 2025-07-22] [$250] Expense - LHN does not show report total after adding unreported expenses to the report[/+]melvin-bot commentedon Jul 15, 2025
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Jul 15, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.80-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 2025-07-22. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Jul 15, 2025
@brunovjk @johncschuster 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]
johncschuster commentedon Jul 15, 2025
BugZero Checklist:
Bug classification
Source of bug:
Where bug was reported:
Who reported the bug:
[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:
[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:
[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.
Regression Test Proposal Template
[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
Precondition:
Test:
Do we agree 👍 or 👎
johncschuster commentedon Jul 21, 2025
Payment Summary
Contributor: @FitseTLT paid $250 via Upwork ✅
Contributor+: @brunovjk paid $250 via Upwork ✅
brunovjk commentedon Jul 21, 2025
BugZero Checklist:
Bug classification
Source of bug:
Where bug was reported:
Who reported the bug:
[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: Add unreportedExpense to report page #60352 (comment)
[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:
[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.
Regression Test Proposal
Tests
Precondition:
Account has self DM.
Do we agree 👍 or 👎