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-06-12] [$250] Preview shows "Deleted report" when new report is created offline when workflows are disabled #62565
Version Number: 9.1.49-4 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from TestRail: Exp Email or phone of affected tester (no customers):applausetester+2e89292@applause.expensifail.com Issue reported by: Applause Internal Team Device used: Mac 15.4 / Chrome App Component: Money Requests
Action Performed:
Precondition:
Create a workspace and disable Workflows in More features.
Go to staging.new.expensify.com
Go to workspace chat.
Go offline.
Click + > Create report.
Expected Result:
Expense preview will show the empty report preview.
Actual Result:
Expense preview shows "Deleted report" when new report is created offline when workflows are disabled.
Then we will prevent the close status here if isEmptyReport is true. I checked all cases in this function for empty report in backend and only this case is different from front-end now.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Update createNewReport test to correct this scenario
What alternative solutions did you explore? (Optional)
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.
When approval is disabled or the workflow is disabled, isSubmitAndCloseLocal = true in getExpenseReportStateAndStatus. This makes the following condition true:
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
NA
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.
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.59-7 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@mananjadhav@mallenexpensify@mananjadhav 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: I couldn't pinpoint to a specific PR for causing this.
[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: NA
[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:
Create a workspace and disable Workflows in More features.
Test:
Go to staging.new.expensify.com
Go to workspace chat.
Go offline.
Click + > Create report.
Expense preview will show the empty report preview.
Activity
melvin-bot commentedon May 22, 2025
Triggered auto assignment to @mallenexpensify (
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.nkdengineer commentedon May 22, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Expense preview shows "Deleted report" when new report is created offline when workflows are disabled.
What is the root cause of that problem?
The empty expense report is marked as closed in optimistic data when the workflows are disabled. But backend returns it as open report.
App/src/libs/ReportUtils.ts
Lines 5553 to 5558 in 40b31da
Then offline, the preview is shown as deleted based on this condition.
App/src/pages/home/report/PureReportActionItem.tsx
Lines 848 to 850 in 40b31da
What changes do you think we should make in order to solve the problem?
We should introduce a new param like
isEmptyReportforgetExpenseReportStateAndStatusApp/src/libs/ReportUtils.ts
Line 5644 in 40b31da
Then we will prevent the close status here if
isEmptyReportis true. I checked all cases in this function for empty report in backend and only this case is different from front-end now.App/src/libs/ReportUtils.ts
Lines 5553 to 5558 in 40b31da
After that we will pass
isEmptyReportistruehereApp/src/libs/ReportUtils.ts
Lines 5644 to 5645 in 40b31da
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Update
createNewReporttest to correct this scenarioWhat alternative solutions did you explore? (Optional)
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.
nyomanjyotisa commentedon May 22, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Preview shows "Deleted report" when new report is created offline when workflows are disabled
What is the root cause of that problem?
We use
getExpenseReportStateAndStatusonbuildOptimisticEmptyReport, which is only valid forbuildOptimisticExpenseReportApp/src/libs/ReportUtils.ts
Lines 5644 to 5645 in 40b31da
it has this condition which set the status to closed, and it not align with data coming from backend
App/src/libs/ReportUtils.ts
Lines 5553 to 5558 in 40b31da
What changes do you think we should make in order to solve the problem?
We should create a new get state and status function specifically for empty report
getEmptyReportStateAndStatusand use it here
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
update test for
createNewReportaccordingly, based on above solutionWhat alternative solutions did you explore? (Optional)
None
mallenexpensify commentedon May 23, 2025
Unable to reproduce, @nkdengineer or @nyomanjyotisa , any idea what I might be going wrong?
2025-05-22_17-23-45.mp4
nkdengineer commentedon May 23, 2025
@mallenexpensify Did you disable the workflows feature in this workspace? We can only reproduce if the workflow is disabled.
mallenexpensify commentedon May 23, 2025
I can't reproduce when I'm offline but.. I get this 'deleted report' blip when I'm online
2025-05-23_09-48-31.mp4
Think that's the same bug? Or... would the proposed fix also address what I'm seeing when online? I can gather / send more details, if needed.
nkdengineer commentedon May 23, 2025
@mallenexpensify Yeah, it's the same bug but not sure why you can't reproduce it offline. I can reproduce it easily
Screen.Recording.2025-05-24.at.00.11.07.mov
dmkt9 commentedon May 25, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Expense preview shows "Deleted report" when new report is created offline when workflows are disabled.
What is the root cause of that problem?
The Report's
OptimisticEmptyReportis created here:App/src/libs/ReportUtils.ts
Lines 5693 to 5694 in 526a0e4
When approval is disabled or the workflow is disabled,
isSubmitAndCloseLocal = trueingetExpenseReportStateAndStatus. This makes the following condition true:App/src/libs/ReportUtils.ts
Lines 5601 to 5606 in 526a0e4
What changes do you think we should make in order to solve the problem?
getExpenseReportStateAndStatusthere should be a step to check whether the report contains only nonreimbursable transactions:App/src/libs/ReportUtils.ts
Line 5601 in 526a0e4
reportIDparameter togetExpenseReportStateAndStatusfunction:App/src/libs/ReportUtils.ts
Line 5596 in 526a0e4
reportIDfrom here togetExpenseReportStateAndStatus:App/src/libs/ReportUtils.ts
Line 5693 in 526a0e4
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
NA
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.
melvin-bot commentedon May 27, 2025
@mallenexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
melvin-bot commentedon May 27, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021927445253198939393
25 remaining items
melvin-bot commentedon Jun 5, 2025
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Jun 5, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.59-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 2025-06-12. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Jun 5, 2025
@mananjadhav @mallenexpensify @mananjadhav 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]
mananjadhav commentedon Jun 13, 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: I couldn't pinpoint to a specific PR for causing this.
[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: NA
[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 👎
mananjadhav commentedon Jun 13, 2025
@mallenexpensify This is ready for payout.
garrettmknight commentedon Jun 13, 2025
Payment summary:
Contributor: @nkdengineer $250, paid via Upwork
Contributor+: @mananjadhav $250 via Newdot
JmillsExpensify commentedon Jun 13, 2025
Payment summary:
Contributor: @nkdengineer $250 via Upwork
Contributor+: @mananjadhav $250 via New Expensify
garrettmknight commentedon Jun 13, 2025
$250 approved for @mananjadhav
nkdengineer commentedon Oct 22, 2025
@garrettmknight This was not paid out yet, could you please help to double check?
Thanks in advance 🙏
mallenexpensify commentedon Oct 22, 2025
hahha, third time is a charm @nkdengineer , you're paid now. Sorry for the hassle.