Repository navigation
Description
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 9.0.47-2
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @allgandalf
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1728540959841099
Action Performed:
- Submit an expense with violation
- Select focus mode in preferences
- Delete the Workspace where the expenses was submitted
- Observe LHN
Expected Result:
Report in archived status
Actual Result:
See RBR in LHN with the report, but cannot act on it as don't have edit access anymore to that report, but also cannot do anything here, it stays in my LHN
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
- Android: Native
- Android: mWeb Chrome
- iOS: Native
- iOS: mWeb Safari
- MacOS: Chrome / Safari
- MacOS: Desktop
Screenshots/Videos
Recording.642.mp4
Onyx data:
{ "chatReportID": "4695747423350738", "chatType": "", "currency": "INR", "description": "", "errorFields": {}, "hasOutstandingChildRequest": false, "hasOutstandingChildTask": false, "hasParentAccess": true, "isCancelledIOU": false, "isOwnPolicyExpenseChat": false, "isPinned": false, "isWaitingOnBankAccount": false, "lastActionType": "CLOSED", "lastActorAccountID": "16559988", "lastMessageHtml": "closed this report", "lastMessageText": "closed this report", "lastReadSequenceNumber": 0, "lastReadTime": "2024-10-10 06:16:13.007", "lastVisibleActionCreated": "2024-04-08 08:54:26.839", "lastVisibleActionLastModified": "2024-04-08 08:54:26.839", "managerID": 0, "nonReimbursableTotal": 0, "notificationPreference": "hidden", "oldPolicyName": "Whogandalf's Workspace 27", "ownerAccountID": 16559988, "parentReportActionID": "6007246625411673721", "parentReportID": "4695747423350738", "participants": { "16559988": { "hidden": true, "notificationPreference": "hidden" } }, "permissions": [], "policyID": "3DEDDF79F054B00A", "private_isArchived": "2024-07-18 11:24:28.169", "reportID": "4817250283487348", "reportName": "Expense Report #5426340451518743", "stateNum": 2, "statusNum": 2, "total": 0, "type": "expense", "unheldTotal": 0, "welcomeMessage": "", "writeCapability": "all", "isLoadingPrivateNotes": false, "privateNotes": { "16559988": { "note": "" } } }
Add any screenshot/video evidence
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~021845769561131002585
- Upwork Job ID: 1845769561131002585
- Last Price Increase: 2024-10-21
- Automatic offers:
- allgandalf | Reviewer | 104576294
Issue Owner
Current Issue Owner: @Issue Owner
Current Issue Owner: @sonialiapMetadata
Metadata
Labels
Type
Projects
- StatusShow more project fieldsDone

Activity
melvin-bot commentedon Oct 10, 2024
Triggered auto assignment to @sonialiap (
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.allgandalf commentedon Oct 10, 2024
Note
Can i be the C+ for this issue @sonialiap , I reported this bug and have prior context
bernhardoj commentedon Oct 10, 2024
Edited by proposal-police: This proposal was edited at 2024-10-17 14:42:26 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
The RBR still shows for deleted workspace chat and its expense report and thread.
What is the root cause of that problem?
There are 3 RBRs here. 1 in LHN,
App/src/libs/OptionsListUtils.ts
Lines 489 to 527 in 8f90bf8
1 in report preview,
App/src/components/ReportActionItem/ReportPreview.tsx
Lines 162 to 168 in 8f90bf8
and 1 in the expense/transaction preview.
App/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx
Line 147 in 8f90bf8
None of the conditions check for the report archive status. The expense report will stay on the LHN because we always show it if there are errors other than failed receipt.
App/src/libs/SidebarUtils.ts
Lines 121 to 135 in 8f90bf8
Why do the workspace chat and expense/transaction thread not show even if they have the RBR? The
reportActionsin `SidebarUtils.getOrderedReportIDs is coming fromApp/src/hooks/useReportIDs.tsx
Line 87 in 5f1ea58
and somehow the selector that was recently added in #49918 returns a wrong array of actions. For the transaction thread, the parent report action here is undefined,
App/src/libs/OptionsListUtils.ts
Lines 503 to 504 in 5f1ea58
so,
isTransactionThreadis always false. It's undefined because we access theallReportActionsobject without appending thereportActions_key prefix.App/src/libs/OptionsListUtils.ts
Line 506 in 5f1ea58
What changes do you think we should make in order to solve the problem?
We need to check for the report archive status when getting all report errors.
App/src/libs/ReportUtils.ts
Lines 6303 to 6318 in 20b7017
allgandalf commentedon Oct 10, 2024
Note
Can i be the C+ for this issue @sonialiap , I reported this bug and have prior context
melvin-bot commentedon Oct 14, 2024
Job added to Upwork: https://www.upwork.com/jobs/~021845769561131002585
[-]Unable to Act on Report Due to Deleted Workspace, Stuck with RBR in Focus Mode Without Edit Access[/-][+][$250] Unable to Act on Report Due to Deleted Workspace, Stuck with RBR in Focus Mode Without Edit Access[/+]44 remaining items
melvin-bot commentedon Nov 19, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.63-3 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 2024-11-26. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Nov 19, 2024
@allgandalf @sonialiap @allgandalf 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]
sonialiap commentedon Nov 25, 2024
@allgandalf please complete the checklist so that I can release the payment for you tomorrow 😊
allgandalf commentedon Nov 25, 2024
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/50468/files#r1857277702
[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: https://github.com/Expensify/Expensify/issues/448193
Regression Test Proposal
Precondition:
Test:
Verify the workspace chat doesn't show RBR anymore
Do we agree 👍 or 👎
allgandalf commentedon Nov 25, 2024
Sorry for the delay 😅 , I completed the checklist !
bernhardoj commentedon Nov 26, 2024
Requested in ND.
JmillsExpensify commentedon Nov 26, 2024
Waiting for payment summary.
sonialiap commentedon Nov 27, 2024
Payment summary:
sonialiap commentedon Nov 27, 2024
@JmillsExpensify good to approve the ND request 💰
JmillsExpensify commentedon Nov 27, 2024
$250 approved for @bernhardoj