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-09-17] [Due for payment 2025-09-16] [$250] Reports - Details of last created expense, are not seen on preview on "Submit" while offline #68827
Prerequisite: Account has at least one workspace created.
Prerequisite 2: Delayed submissions enabled.
Prerequisite 3: No expenses with "Draft" status.
Open the Expensify app.
Navigate to "Reports"
Navigate to "Submit" if not already on that section.
Turn off internet connection.
Tap on "Create Report"
Add a manual expense to report.
Return to "Reports"
Note that the new created report shows total amount, but a "This report has no expenses" message is seen instead of the expense details.
Tap on FAB and select "Create Expense"
Create a new manual expense and submit it to the same workspace and report.
Note that now, details of the second expense appear, but the details of the first created one, are not seen yet.
Expected Result:
When creating a new expense while offline on "Submit" section, the expense details should be automatically seen on report preview.
Actual Result:
When creating the first expense on report while offline on “Submit”, a "This report has no expenses" message can be seen, and when creating a second expense, total amount updates, but only the details of the second expense appear. Details of first expense doesn’t appear yet.
Please re-state the problem that we are trying to solve in this issue.
When creating the first expense on report while offline on “Submit”, a "This report has no expenses" message can be seen, and when creating a second expense, total amount updates, but only the details of the second expense appear. Details of first expense doesn’t appear yet.
What is the root cause of that problem?
We check the list key from the data. If the transaction key is checked before the report key, the transaction is not added to the list of transactions of the report data because reportIDToTransactions[reportKey] is undefined.
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
Please re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
Since in this case, if a transaction is processed before its corresponding report, reportIDToTransactions[reportKey] will be undefined, and the transaction won't be added to the list.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Add tests for getReportSections.
What alternative solutions did you explore? (Optional)
NA
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
changed the title [-]Reports - Details of last created expense, are not seen on preview on "Submit" while offline[/-][+][$250] Reports - Details of last created expense, are not seen on preview on "Submit" while offline[/+]on Aug 20, 2025
Both proposals have same root cause and technically solutions are just refactoring the code so I don't consider one syntax good over another. With this, I think we can go with the first proposal with correct idea.
[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: Not needed
[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
Precondition:
Account has at least one workspace created.
Delayed submissions enabled.
No expenses with "Draft" status.
Test:
Navigate to "Reports"
Navigate to "Submit" if not already on that section.
Turn off internet connection.
Tap on "Create Report"
Add a manual expense to report.
Return to "Reports"
Expected Result:
The expense details should be automatically seen on report preview.
Activity
melvin-bot commentedon Aug 20, 2025
Triggered auto assignment to @laurenreidexpensify (
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.mkzie2 commentedon Aug 20, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
When creating the first expense on report while offline on “Submit”, a "This report has no expenses" message can be seen, and when creating a second expense, total amount updates, but only the details of the second expense appear. Details of first expense doesn’t appear yet.
What is the root cause of that problem?
We check the list key from the data. If the transaction key is checked before the report key, the transaction is not added to the list of transactions of the report data because
reportIDToTransactions[reportKey]is undefined.App/src/libs/SearchUIUtils.ts
Lines 1373 to 1379 in 4d7d44a
What changes do you think we should make in order to solve the problem?
We should re-order the list key to always check the report key first
App/src/libs/SearchUIUtils.ts
Line 1295 in 4d7d44a
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Update
SearchUIUtilstest to cover the case where the transaction key is above the report keyWhat alternative solutions did you explore? (Optional)
Or if
reportIDToTransactions[reportKey]isundefined, assign this object as an empty object and update the transaction listApp/src/libs/SearchUIUtils.ts
Lines 1373 to 1379 in 4d7d44a
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
dmkt9 commentedon Aug 20, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
Since in this case, if a transaction is processed before its corresponding report,
reportIDToTransactions[reportKey]will beundefined, and the transaction won't be added to the list.App/src/libs/SearchUIUtils.ts
Lines 1373 to 1379 in 9ce95b7
What changes do you think we should make in order to solve the problem?
We need to refactor this logic to make the code more coherent and ensure all cases are properly handled.
App/src/libs/SearchUIUtils.ts
Lines 1373 to 1379 in 9ce95b7
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Add tests for
getReportSections.What alternative solutions did you explore? (Optional)
NA
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
[-]Reports - Details of last created expense, are not seen on preview on "Submit" while offline[/-][+][$250] Reports - Details of last created expense, are not seen on preview on "Submit" while offline[/+]melvin-bot commentedon Aug 20, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021958158813749221737
melvin-bot commentedon Aug 20, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat (
External)parasharrajat commentedon Aug 21, 2025
Both proposals have same root cause and technically solutions are just refactoring the code so I don't consider one syntax good over another. With this, I think we can go with the first proposal with correct idea.
Thus we can go with @mkzie2's alternative solution as it simple change over reordering.
🎀 👀 🎀 C+ reviewed
melvin-bot commentedon Aug 21, 2025
Triggered auto assignment to @inimaga, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
44 remaining items
mkzie2 commentedon Sep 23, 2025
@parasharrajat Sorry for the delay (it was a bit tricky to fix the regression). The PR is now ready for review
laurenreidexpensify commentedon Oct 3, 2025
@parasharrajat bump for Review on the PR ^^ thanks
parasharrajat commentedon Oct 3, 2025
Sure, I will check that again. Thanks for the reminder
laurenreidexpensify commentedon Oct 20, 2025
Looks like this was deployed to prod 7 days ago - #70181 (comment) - @parasharrajat are we good to proceed to payment?
parasharrajat commentedon Oct 20, 2025
@laurenreidexpensify yes it is done and ready for payment.
parasharrajat commentedon Oct 20, 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: [No QA][Search v1] Create ReportListItem #42410 (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: Not needed
[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
Precondition:
Test:
Do we agree 👍 or 👎
laurenreidexpensify commentedon Oct 20, 2025
Paymnet Summary
parasharrajat commentedon Nov 9, 2025
Payment requested as per #68827 (comment)
trjExpensify commentedon Nov 17, 2025
approved $250 for @parasharrajat.