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
[$250] $250 Remove the code which clears report draft indicators when a policy is deleted #73938
🚨 Edited by proposal-police: This proposal was edited at 2025-10-31 17:38:34 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Remove the code which clears report draft indicators when a policy is deleted
What is the root cause of that problem?
Improvement
What changes do you think we should make in order to solve the problem?
Add an explicit cleanup function, e.g. cleanupPolicyReports(policyID: string), that performs the Onyx operations.
Remove the Onyx.mergeCollection / Onyx.multiSet / delete allPolicies[...] from the Onyx connection callback.
Call cleanupPolicyReports from the action that issues the policy deletion (or from the codepath that knows a policy is being deleted), so the side-effect is explicit and can be unit-tested or mocked.
Tests to add
Unit test for cleanupPolicyReports: ensure Onyx.multiSet is called with the proper keys for a given set of policy reports.
Integration test: archive/delete a policy and assert LHN no longer shows the archived chats and draft comments were removed.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
n/A
What alternative solutions did you explore? (Optional)
changed the title [-]$250 Remove the code which clears report draft indicators when a policy is deleted[/-][+][$250] $250 Remove the code which clears report draft indicators when a policy is deleted[/+]on Oct 31, 2025
There has been a slight twist to this issue. In #73937 (comment) it was discovered that the code might no longer be necessary at all. If that can be confirmed, then we will just remove all instances of it in that PR and this issue can be closed.
We updated the other PR to remove all instances of the code, so this can be closed now. Sorry about the confusion with this one. At first, I wasn't sure if the code was still necessary or not.
Activity
melvin-bot commentedon Oct 31, 2025
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.PiyushChandra17 commentedon Oct 31, 2025
🚨 Edited by proposal-police: This proposal was edited at 2025-10-31 17:38:34 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Remove the code which clears report draft indicators when a policy is deleted
What is the root cause of that problem?
Improvement
What changes do you think we should make in order to solve the problem?
cleanupPolicyReports(policyID: string), that performs theOnyxoperations.Onyx.mergeCollection / Onyx.multiSet / delete allPolicies[...]from the Onyx connection callback.cleanupPolicyReportsfrom the action that issues the policy deletion (or from the codepath that knows a policy is being deleted), so theside-effectis explicit and can be unit-tested or mocked.Tests to add
Unit test for
cleanupPolicyReports: ensureOnyx.multiSetis called with the proper keys for a given set of policy reports.Integration test: archive/delete a policy and assert LHN no longer shows the archived chats and draft comments were removed.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
n/A
What alternative solutions did you explore? (Optional)
n/A
[-]$250 Remove the code which clears report draft indicators when a policy is deleted[/-][+][$250] $250 Remove the code which clears report draft indicators when a policy is deleted[/+]melvin-bot commentedon Oct 31, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021984308625540406217
melvin-bot commentedon Oct 31, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @thesahindia (
External)4 remaining items
melvin-bot commentedon Oct 31, 2025
Current assignee @thesahindia is eligible for the External assigner, not assigning anyone new.
melvin-bot commentedon Oct 31, 2025
Current assignee @sonialiap is eligible for the Bug assigner, not assigning anyone new.
tgolen commentedon Oct 31, 2025
Oh labels... what have I done 😂
tgolen commentedon Nov 3, 2025
@thesahindia will be reviewing proposals for this one
thesahindia commentedon Nov 5, 2025
@PiyushChandra17's proposal seems fine. Let's assign it to them.
🎀 👀 🎀 C+ reviewed
melvin-bot commentedon Nov 5, 2025
Current assignee @tgolen is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.
tgolen commentedon Nov 5, 2025
There has been a slight twist to this issue. In #73937 (comment) it was discovered that the code might no longer be necessary at all. If that can be confirmed, then we will just remove all instances of it in that PR and this issue can be closed.
PiyushChandra17 commentedon Nov 10, 2025
@tgolen What's the status on this ?
tgolen commentedon Nov 10, 2025
We updated the other PR to remove all instances of the code, so this can be closed now. Sorry about the confusion with this one. At first, I wasn't sure if the code was still necessary or not.