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
[HOLD for payment 2023-08-16] [$1000] Web - Deleted Workspace can be accessed after deleting a workspace offline #23355
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorWeeklyKSv2
Go to any workspace > click on the three dots > click on Admins room
Go to the Details page by clicking on the Admin room header
Go to the workspace by clicking on the workspace name below the #admin
Delete the workspace by clicking on the three dots above
By Click on the back button you will be taken to the archived #Admin room.
Go to the workspace by clicking on the workspace name below the #admin(Archived)
Expected Result:
Can't access the deleted workspace
Actual Result:
Can access the deleted workspace
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Android / native
Android / Chrome
iOS / native
iOS / Safari
MacOS / Chrome / Safari
MacOS / Desktop
Version Number: 1.3.43-6 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 Notes/Photos/Videos: Any additional supporting documentation
What changes do you think we should make in order to solve the problem?
Add an extra condition to {isPolicyAdmin ? ( to check if the workspace has not been optimistically deleted (i.e. pendingAction is delete), in which case we should not render the link, i.e. keep just the text.
What alternative solutions did you explore? (Optional)
Option 1. In PolicyUtils.isPolicyAdmin, return false if the workspace is optimistically deleted.
Option 2. Remove the admin role of the user. However, this will remove the workspace from the workspaces list, which is undesired.
changed the title [-]Web - Deleted Workspace can be accessed after deleting a workspace offline[/-][+][$1000] Web - Deleted Workspace can be accessed after deleting a workspace offline[/+]on Jul 24, 2023
Please re-state the problem that we are trying to solve in this issue.
The problem we are trying to solve is that a deleted workspace can still be accessed after the user deletes it while being offline. Even after successfully deleting the workspace, the user can still access it, which is unexpected behavior.
What is the root cause of that problem?
The root cause of this issue is related to the synchronization of the workspace deletion status when the user is offline. When the user deletes a workspace while offline, the deletion status is not immediately synchronized with the server. As a result, the client-side view may still show the deleted workspace as accessible.
What changes do you think we should make in order to solve the problem?
To solve the problem, we need to ensure that the deletion status of the workspace is accurately synchronized with the server, even when the user is offline. When the user attempts to delete a workspace while offline, the application should queue the deletion request and attempt to synchronize it with the server once the user is back online.
When the synchronization process occurs, the server should receive the deletion request and process it accordingly. Upon successful deletion, the client-side view should update to reflect the updated workspace list without the deleted workspace. This ensures that the deleted workspace cannot be accessed after successful deletion, regardless of the user's online/offline status during the deletion process.
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
[@fedirjh] The PR that introduced the bug has been identified. Link to the PR:
[@fedirjh] 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:
[@fedirjh] A discussion in #expensify-bugs 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:
[@fedirjh] Determine if we should create a regression test for this bug.
[@fedirjh] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
[@conorpendergrast / @kevinksullivan] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorWeeklyKSv2
Activity
melvin-bot commentedon Jul 21, 2023
Triggered auto assignment to @kevinksullivan (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Jul 21, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)samh-nl commentedon Jul 21, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
A workspace that has been deleted while offline can still be accessed.
What is the root cause of that problem?
In
ReportDetailsPage, the workspace name remains clickable asisPolicyAdminstaystruewhen deleting a workspace while the user is offline.App/src/pages/ReportDetailsPage.js
Lines 161 to 173 in 9dd3a3f
What changes do you think we should make in order to solve the problem?
Add an extra condition to
{isPolicyAdmin ? (to check if the workspace has not been optimistically deleted (i.e.pendingActionis delete), in which case we should not render the link, i.e. keep just the text.What alternative solutions did you explore? (Optional)
Option 1. In
PolicyUtils.isPolicyAdmin, return false if the workspace is optimistically deleted.Option 2. Remove the admin role of the user. However, this will remove the workspace from the workspaces list, which is undesired.
[-]Web - Deleted Workspace can be accessed after deleting a workspace offline[/-][+][$1000] Web - Deleted Workspace can be accessed after deleting a workspace offline[/+]melvin-bot commentedon Jul 24, 2023
Job added to Upwork: https://www.upwork.com/jobs/~011eef84994dda9118
melvin-bot commentedon Jul 24, 2023
Current assignee @kevinksullivan is eligible for the External assigner, not assigning anyone new.
melvin-bot commentedon Jul 24, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @fedirjh (
External)rk111 commentedon Jul 24, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
The problem we are trying to solve is that a deleted workspace can still be accessed after the user deletes it while being offline. Even after successfully deleting the workspace, the user can still access it, which is unexpected behavior.
What is the root cause of that problem?
The root cause of this issue is related to the synchronization of the workspace deletion status when the user is offline. When the user deletes a workspace while offline, the deletion status is not immediately synchronized with the server. As a result, the client-side view may still show the deleted workspace as accessible.
What changes do you think we should make in order to solve the problem?
To solve the problem, we need to ensure that the deletion status of the workspace is accurately synchronized with the server, even when the user is offline. When the user attempts to delete a workspace while offline, the application should queue the deletion request and attempt to synchronize it with the server once the user is back online.
When the synchronization process occurs, the server should receive the deletion request and process it accordingly. Upon successful deletion, the client-side view should update to reflect the updated workspace list without the deleted workspace. This ensures that the deleted workspace cannot be accessed after successful deletion, regardless of the user's online/offline status during the deletion process.
51 remaining items
melvin-bot commentedon Aug 9, 2023
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
kevinksullivan commentedon Aug 15, 2023
Set to make the payment tomorrow! @fedirjh can you finish out the steps above so we can pay out on time?
conorpendergrast commentedon Aug 16, 2023
Ah, you're back! Unassigning myself now Kevin
fedirjh commentedon Aug 16, 2023
BugZero Checklist:
fedirjh commentedon Aug 28, 2023
cc @kevinksullivan this one is 2 weeks overdue
daveSeife commentedon Aug 29, 2023
@kevinksullivan can you please add me as a Reporter?
kevinksullivan commentedon Aug 30, 2023
Paid @fedirjh . @DanutGavrus @daveSeife just sent you both offers. Lmk when you accept!
daveSeife commentedon Aug 31, 2023
@kevinksullivan accepted the offer. Thank you!
DanutGavrus commentedon Sep 1, 2023
@kevinksullivan Offer accepted with updated price as to also include the bonus. Thank you!
DanutGavrus commentedon Sep 5, 2023
Hi, @kevinksullivan! Offer is still in pending, if you have the time. Thanks!
kevinksullivan commentedon Sep 6, 2023
all set