Skip to content

[Due for payment 2025-03-21] [$250] Workspace - The user is displayed in member list after leaving the workspace #56516

Closed

Description

@IuliiaHerets

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com 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-17
  • Automatic offers:
    • mkzie2 | Contributor | 106391294
Issue OwnerCurrent Issue Owner: @ahmedGaber93

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Feb 7, 2025
  2. melvin-bot commented on Feb 7, 2025

    @melvin-bot

    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.

  3. mkzie2 commented on Feb 7, 2025

    @mkzie2
    Contributor

    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.

  4. melvin-bot commented on Feb 10, 2025

    @melvin-bot

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

  5. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Feb 10, 2025
  6. 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
  7. melvin-bot commented on Feb 10, 2025

    @melvin-bot
  8. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Feb 10, 2025
  9. melvin-bot commented on Feb 10, 2025

    @melvin-bot

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

  10. melvin-bot commented on Feb 14, 2025

    @melvin-bot

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

  11. 43 remaining items

  12. 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
  13. melvin-bot commented on Mar 14, 2025

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  14. melvin-bot commented on Mar 14, 2025

    @melvin-bot

    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:

  15. melvin-bot commented on Mar 14, 2025

    @melvin-bot

    @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]

  16. sonialiap commented on Mar 21, 2025

    @sonialiap
    Contributor

    Payment summary:
    @ahmedGaber93 $250 please request payment in ND
    @mkzie2 $250 paid in upwork ✔

  17. ahmedGaber93 commented on Mar 21, 2025

    @ahmedGaber93
    Contributor

    BugZero Checklist:

    • [Contributor] Classify the bug:
    Bug classification

    Source of bug:

    • 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: Applause Internal Team
    • [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.

  18. sonialiap commented on Mar 24, 2025

    @sonialiap
    Contributor

    Thanks Ahmed!

  19. moved this from Bugs and Follow Up Issues to Done in #expensify-bugson Mar 24, 2025
  20. JmillsExpensify commented on Apr 25, 2025

    @JmillsExpensify
    Contributor

    $250 approved for @ahmedGaber93

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions