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-27] [$250] Workspace - In offline, in preview red dot not displayed and category no longer valid not shown #61306
Version Number: V9.1.39-2 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): Slottwo1 sivappa3@gmail.com Issue reported by: Applause Internal Team Device used: Redminote note 10s android 13 App Component: Money Requests
Action Performed:
Launch app
Open a workspace chat
Create a manual expense with advertisement category
Go to category page
Turn off internet
Tap advertisement and delete the category
Go back to workspace chat
Turn on internet
Expected Result:
In offline, in preview red dot must be displayed and category no longer valid message must be shown.
Actual Result:
In offline, in preview red dot not displayed and category no longer valid not shown.
What changes do you think we should make in order to solve the problem?
Let's create a function, eg, getTransactionsViolationsOnyxData, that can use ViolationsUtils.getViolationsOnyxData to get the OnyxData of each transaction, if the policy or its categories or tag lists are updated or optimistic.
Use getTransactionsViolationsOnyxData in the functions that need the policy's updated transaction violations, such as deleteWorkspaceCategories.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Create tests for deleteWorkspaceCategories to check whether the categoryOutOfPolicy violation is in optimisticData and other functions that require updating the policy's transaction violation onyx.
What alternative solutions did you explore? (Optional)
changed the title [-]Workspace - In offline, in preview red dot not displayed and category no longer valid not shown[/-][+][$250] Workspace - In offline, in preview red dot not displayed and category no longer valid not shown[/+]on May 8, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.69-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@mananjadhav@strepanier03@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 would treat this as a feature request and a case we didn't consider earlier.
[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:
I think this needs to be covered with a regression test.
Regression Test Proposal
Test Case 1:
Create a new workspace.
Create a manual expense with a category.
Open the expense report by clicking the report preview.
Confirm the expense as no violations.
Go to the category page.
Go offline.
Delete the category used in step 2.
Go back to the expense report.
Confirm the category field displays a violation that reads "Category no longer valid".
Go online.
Confirm the violation persists.
Test Case 2:
Go Offline
Update the category of an expense that has no violations.
Delete a category used in step 2.
Go back to the expense report.
Confirm the category field displays a violation that reads "Category no longer valid".
Update the category of an expense.
Confirm the violation is cleared.
Go online.
Confirm the violation is still cleared.
Test Case 3:
Delete an expense.
In the same workspace, create a manual expense with a category.
Go Offline.
Delete a category used in step 2.
Go back to the expense report.
Confirm the category field displays a violation that reads "Category no longer valid".
Activity
melvin-bot commentedon May 2, 2025
Triggered auto assignment to @strepanier03 (
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.Tony-MK commentedon May 4, 2025
🚨 Edited by proposal-police: This proposal was edited at 2025-05-14 15:21:30 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Workspace - In offline, in preview red dot is not displayed, andthe category is no longer valid not shown
What is the root cause of that problem?
The
deleteWorkspaceCategoriesfunction does not optimistically push the newcategoryOutOfPolicytransaction violation tooptimisticData.App/src/libs/actions/Policy/Category.ts
Lines 969 to 980 in 74b93b9
What changes do you think we should make in order to solve the problem?
Let's create a function, eg,
getTransactionsViolationsOnyxData, that can useViolationsUtils.getViolationsOnyxDatato get theOnyxDataof each transaction, if the policy or its categories or tag lists are updated or optimistic.Use
getTransactionsViolationsOnyxDatain the functions that need the policy's updated transaction violations, such asdeleteWorkspaceCategories.What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Create tests for
deleteWorkspaceCategoriesto check whether thecategoryOutOfPolicyviolation is inoptimisticDataand other functions that require updating the policy's transaction violation onyx.What alternative solutions did you explore? (Optional)
N/A
melvin-bot commentedon May 5, 2025
@strepanier03 Whoops! This issue is 2 days overdue. Let's get this updated quick!
melvin-bot commentedon May 7, 2025
@strepanier03 Huh... This is 4 days overdue. Who can take care of this?
[-]Workspace - In offline, in preview red dot not displayed and category no longer valid not shown[/-][+][$250] Workspace - In offline, in preview red dot not displayed and category no longer valid not shown[/+]melvin-bot commentedon May 8, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021920547540652397343
melvin-bot commentedon May 8, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mananjadhav (
External)32 remaining items
melvin-bot commentedon Jun 20, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.69-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 2025-06-27. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Jun 20, 2025
@mananjadhav @strepanier03 @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]
strepanier03 commentedon Jun 27, 2025
Payment Summary
mananjadhav commentedon Jun 27, 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 would treat this as a feature request and a case we didn't consider earlier.
[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:
I think this needs to be covered with a regression test.
Regression Test Proposal
Test Case 1:
Test Case 2:
Test Case 3:
Do we agree 👍 or 👎
@strepanier03 ^
mananjadhav commentedon Jun 30, 2025
@strepanier03 This is all set to be closed.
strepanier03 commentedon Jun 30, 2025
@mananjadhav - I removed the hold from the payment summary.
Closing out.
garrettmknight commentedon Jul 3, 2025
$250 approved for @mananjadhav