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-03-21] [$250] Workspace - The user is displayed in member list after leaving the workspace #56516
Please re-state the problem that we are trying to solve in this issue.
The user A is still present in the workspace list after leaving the workspace.
What is the root cause of that problem?
When the user A leaves the workspace, the backend returns an error so from user B's side, this user isn't removed in the member list. The current bug here is the workspace doesn't appear again on user A's side.
The RCA is we set the pendingAction to policy?.pendingAction in the failureData but policy?.pendingAction is undefined so this value is ignored then the policy.pendingAction is still delete after the API fails and it's not displayed in the online mode
Optional: We can add an error for policy in failureData to display an error in the workspace list page.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Test leaveWorkspace API with the failure case and verify that the pendingAction is removed
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 [-]Workspace - The user is displayed in member list after leaving the workspace[/-][+][$250] Workspace - The user is displayed in member list after leaving the workspace[/+]on Feb 10, 2025
changed the title [-][$250] Workspace - The user is displayed in member list after leaving the workspace[/-][+][Due for payment 2025-03-21] [$250] Workspace - The user is displayed in member list after leaving the workspace[/+]on Mar 14, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.12-7 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@ahmedGaber93@sonialiap@ahmedGaber93 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.
This is a straight forward fix, I don't think we need to add a regression test here.
Activity
melvin-bot commentedon Feb 7, 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.mkzie2 commentedon Feb 7, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
The user A is still present in the workspace list after leaving the workspace.
What is the root cause of that problem?
When the user A leaves the workspace, the backend returns an error so from user B's side, this user isn't removed in the member list. The current bug here is the workspace doesn't appear again on user A's side.
The RCA is we set the
pendingActiontopolicy?.pendingActionin thefailureDatabutpolicy?.pendingActionisundefinedso this value is ignored then thepolicy.pendingActionis stilldeleteafter the API fails and it's not displayed in the online modeApp/src/libs/actions/Policy/Policy.ts
Line 763 in d687284
App/src/libs/actions/Policy/Policy.ts
Line 785 in d687284
What changes do you think we should make in order to solve the problem?
We should fallback the
pendingActiontonullifpolicy?.pendingActionisundefinedApp/src/libs/actions/Policy/Policy.ts
Line 785 in d687284
Optional: We can add an error for policy in
failureDatato display an error in the workspace list page.What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Test
leaveWorkspaceAPI with the failure case and verify that thependingActionis removedWhat 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.
melvin-bot commentedon Feb 10, 2025
@sonialiap Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
[-]Workspace - The user is displayed in member list after leaving the workspace[/-][+][$250] Workspace - The user is displayed in member list after leaving the workspace[/+]melvin-bot commentedon Feb 10, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021888911818979707866
melvin-bot commentedon Feb 10, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ahmedGaber93 (
External)melvin-bot commentedon Feb 14, 2025
@sonialiap, @ahmedGaber93 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
43 remaining items
[-][$250] Workspace - The user is displayed in member list after leaving the workspace[/-][+][Due for payment 2025-03-21] [$250] Workspace - The user is displayed in member list after leaving the workspace[/+]melvin-bot commentedon Mar 14, 2025
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Mar 14, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.12-7 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-03-21. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Mar 14, 2025
@ahmedGaber93 @sonialiap @ahmedGaber93 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 Mar 21, 2025
Payment summary:
@ahmedGaber93 $250 please request payment in ND
@mkzie2 $250 paid in upwork ✔
ahmedGaber93 commentedon Mar 21, 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/35671/files#r2007530728
[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.
This is a straight forward fix, I don't think we need to add a regression test here.
sonialiap commentedon Mar 24, 2025
Thanks Ahmed!
JmillsExpensify commentedon Apr 25, 2025
$250 approved for @ahmedGaber93