Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[$250] Workspace - The user is displayed in member list after leaving the workspace #56516

Open
3 of 8 tasks
IuliiaHerets opened this issue Feb 7, 2025 · 5 comments
Open
3 of 8 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Feb 7, 2025

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: v9.0.95-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
Issue reported by: Applause Internal Team
Device used: Mac 15.2 Safari
App Component: Workspace Settings

Action Performed:

  1. Navigate to the https://staging.new.expensify.com
  2. As a User A, create a workspace
  3. Invite a User B and set them as a workspace admin
  4. Login as a User B
  5. Navigate to the Workspace settings > Members
  6. Click on the workspace owner (User A)
  7. Click on the "Transfer ownership" button (Now the User A is an admin)
  8. Set a User A as a member
  9. Login as a User A
  10. Navigate to the Settings > Workspaces
  11. Click on the 3-dot button and leave the workspace
  12. Login as a User B

Expected Result:

User A is removed from the workspace list

Actual Result:

The user A is still present in the workspace list after leaving the workspace.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6735837_1738898748639.Recording__581.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021888911818979707866
  • Upwork Job ID: 1888911818979707866
  • Last Price Increase: 2025-02-10
Issue OwnerCurrent Issue Owner: @ahmedGaber93
@IuliiaHerets IuliiaHerets added Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 labels Feb 7, 2025
Copy link

melvin-bot bot commented 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
Copy link
Contributor

mkzie2 commented 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.

Image

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

pendingAction: CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE,

pendingAction: policy?.pendingAction,

What changes do you think we should make in order to solve the problem?

We should fallback the pendingAction to null if policy?.pendingAction is undefined

pendingAction: policy?.pendingAction ?? null,

pendingAction: policy?.pendingAction,

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.

Copy link

melvin-bot bot commented Feb 10, 2025

@sonialiap Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@melvin-bot melvin-bot bot added the Overdue label Feb 10, 2025
@sonialiap sonialiap added the External Added to denote the issue can be worked on by a contributor label Feb 10, 2025
@melvin-bot melvin-bot bot 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 Feb 10, 2025
Copy link

melvin-bot bot commented Feb 10, 2025

Job added to Upwork: https://www.upwork.com/jobs/~021888911818979707866

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 10, 2025
Copy link

melvin-bot bot commented Feb 10, 2025

Triggered auto assignment to Contributor-plus team member for initial proposal review - @ahmedGaber93 (External)

@melvin-bot melvin-bot bot removed the Overdue label Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
None yet
Development

No branches or pull requests

4 participants