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-04] [$250] Expense - Expense preview disappears in workspace chat after report workspace change fails #64459
Version Number: 9.1.68-3 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from TestRail: N/A Email or phone of affected tester (no customers):sdnsoidjiosjdosd3jo@gmail.com Issue reported by: Applause Internal Team Device used: Mac 15.5 / Chrome App Component: Money Requests
Action Performed:
Precondition:
Admin invites member to workspace A only.
Member has another workspace other than workspace A.
Go to staging.new.expensify.com
[Member] Go to workspace chat of the invited workspace.
[Member] Create an expense in the workspace chat.
[Member] Click Submit on the expense preview.
[Admin] Go to workspace chat with member and open expense report.
[Admin] Click More > Hold.
[Admin] Enter reason and save it.
[Member] Open expense report.
[Member] Click More > Change workspace.
[Member] Select another workspace.
[Member] Dismiss the error message that the report workspace cannot be changed.
[Member] Go back to the main workspace chat.
Expected Result:
The expense preview will be displayed in the main workspace chat because changing report workspace fails.
Actual Result:
The expense preview disappears in the main workspace chat when changing report workspace fails.
The expense preview is also not seen in the other workspace chat where the report was intended to change to.
Please re-state the problem that we are trying to solve in this issue.
The expense preview disappears in the main workspace chat when changing report workspace fails.
The expense preview is also not seen in the other workspace chat where the report was intended to change to.
What is the root cause of that problem?
The report preview is reverted in the failureData here but oldReportPreviewAction is undefined
The reason is allReportActions is created with the key is reportID but we get the oldReportPreviewAction with the key is the report action collection key
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Update changeReportPolicy test and verify that the report preview is updated correct when the API fails
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 [-]Expense - Expense preview disappears in workspace chat after report workspace change fails[/-][+][$250] Expense - Expense preview disappears in workspace chat after report workspace change fails[/+]on Jun 19, 2025
changed the title [-][$250] Expense - Expense preview disappears in workspace chat after report workspace change fails[/-][+][Due for payment 2025-07-04] [$250] Expense - Expense preview disappears in workspace chat after report workspace change fails[/+]on Jun 27, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.71-11 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@dukenv0307@maddylewis@dukenv0307 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. Yes
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
Test:
Precondition:
Admin invites member to workspace A only.
Member has another workspace other than workspace A.
Go to staging.new.expensify.com
[Member] Go to workspace chat of the invited workspace.
[Member] Create an expense in the workspace chat.
[Member] Click Submit on the expense preview.
[Admin] Go to workspace chat with member and open expense report.
[Admin] Click More > Hold.
[Admin] Enter reason and save it.
[Member] Open expense report.
[Member] Click More > Change workspace.
[Member] Select another workspace.
[Member] Dismiss the error message that the report workspace cannot be changed.
[Member] Go back to the main workspace chat.
The expense preview will be displayed in the main workspace chat because changing report workspace fails.
Activity
melvin-bot commentedon Jun 18, 2025
Triggered auto assignment to @maddylewis (
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 Jun 18, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
The expense preview disappears in the main workspace chat when changing report workspace fails.
The expense preview is also not seen in the other workspace chat where the report was intended to change to.
What is the root cause of that problem?
The report preview is reverted in the failureData here but
oldReportPreviewActionis undefinedApp/src/libs/actions/Report.ts
Line 5532 in 53702a2
The reason is
allReportActionsis created with the key isreportIDbut we get theoldReportPreviewActionwith the key is the report action collection keyApp/src/libs/actions/Report.ts
Line 5500 in 53702a2
App/src/libs/actions/Report.ts
Line 300 in 53702a2
So the report preview is still marked as deleted, and it disappears
What changes do you think we should make in order to solve the problem?
We should get the correct
oldReportPreviewActionhereApp/src/libs/actions/Report.ts
Line 5500 in 53702a2
And also update the
deletedinoriginalMessagetonullinfailureDatahereApp/src/libs/actions/Report.ts
Line 5532 in 53702a2
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Update
changeReportPolicytest and verify that the report preview is updated correct when the API failsWhat 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.
[-]Expense - Expense preview disappears in workspace chat after report workspace change fails[/-][+][$250] Expense - Expense preview disappears in workspace chat after report workspace change fails[/+]melvin-bot commentedon Jun 19, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021935495089280919000
melvin-bot commentedon Jun 19, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @dukenv0307 (
External)dukenv0307 commentedon Jun 19, 2025
@nkdengineer's proposal looks good to me, let's fix all places that use
allReportActions?.[${ONYXKEYS.COLLECTION.REPORT_ACTIONS...inReport.ts🎀👀🎀 C+ reviewed
melvin-bot commentedon Jun 19, 2025
Triggered auto assignment to @marcaaron, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
4 remaining items
[-][$250] Expense - Expense preview disappears in workspace chat after report workspace change fails[/-][+][Due for payment 2025-07-04] [$250] Expense - Expense preview disappears in workspace chat after report workspace change fails[/+]melvin-bot commentedon Jun 27, 2025
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Jun 27, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.71-11 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-04. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Jun 27, 2025
@dukenv0307 @maddylewis @dukenv0307 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]
dukenv0307 commentedon Jun 30, 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: https://github.com/Expensify/App/pull/58078/files#r2174144236
[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. Yes
[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:
Admin invites member to workspace A only.
Member has another workspace other than workspace A.
Do we agree 👍 or 👎
maddylewis commentedon Jul 2, 2025
Payment Overview + Final To-Dos
JmillsExpensify commentedon Jul 9, 2025
$250 approved for @dukenv0307