Skip to content

[$175] Android- Removing Member with Outstanding Approvals don't show the error #108263

Todo

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.


Version Number: v9.5.55-4
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://test-management.browserstack.com/tc/TC-95643
Email or phone of affected tester (no customers): leila.utest+expensify@gmail.com
Issue reported by: Applause Internal Team
Bug source: Regression TC Execution
Device used: Samsung Galaxy S26 Ultra/Android 17
App Component: Workspace Settings

Action Performed:

Preconditions
User is an Admin of a Control Workspace
At least one other member is added to the Workspace
Workflow / Approvals are enabled for the workspace

  1. Navigate to the Workspace chat
  2. Create a manual expense and submit it
  3. Open the newly created expense report
  4. Navigate to report details
  5. Click More > Change approver
  6. Select the workspace member as approver
  7. Navigate to Workspace Settings > [Workspace Name] > Members
  8. Locate the member who was just assigned as the approver
  9. Select the checkbox next to their name and click the 1 selected dropdown
  10. Click "Remove member"
  11. Click "Remove" on the modal
  12. Verify that an error message is displayed: "xxx has outstanding expense reports to approve. Please ask them to approve, or take control of their reports before removing them from the workspace"

Expected Result:

The assigned approver can't be removed, and the error message should be shown "xxx has outstanding expense reports to approve. Please ask them to approve, or take control of their reports before removing them from the workspace".

Actual Result:

The assigned approver can be removed, and the error message is not shown.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome Safari

Screenshots/Videos

Bug7326566_1795872282107.mobizen_20261128_141025.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Svetlana Lazutkina
Bug ID: 7326566

Upwork Automation - Do Not Edit

Activity

  1. added
    Daily
    Bug
    on Nov 28, 2026
  2. applause-bot commented on Nov 28, 2026

    @applause-bot
    Author

    While Applause doesn't embed attachments for this bug, here are the links for quick view:
    https://platform.applause.com/services/links/v1/external/7de33411aad99fa7a5577723bf367fbb6539306b7a71dbd7be92298d8a736c71

  3. added
    External
    on Nov 28, 2026
  4. expensify-chore-bot commented on Nov 28, 2026

    @expensify-chore-bot

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

  5. changed the title [-]Android- Removing Member with Outstanding Approvals don't show the error[/-] [+][$175] Android- Removing Member with Outstanding Approvals don't show the error[/+] on Nov 28, 2026
  6. expensify-chore-bot commented on Nov 28, 2026

    @expensify-chore-bot
  7. MelvinBot commented on Nov 28, 2026

    @MelvinBot
    Contributor

    🤖 Web test steps verification results: ⚠️ partial

    Investigation blocked on dev NewDot web: created a Control workspace, but no second-member identity was supplied. Issue 108263 was not reproduced or disproved.

    Invite dialog awaiting a second-member identity

    Step Status
    Control workspace setupWorkspace overview showed “Plan type, Control”. This verified setup only.
    ✅
    Approvals, expense submission, approver reassignment, and member removalRuntime verification was blocked because no second member was available. No arbitrary address was invited.

    Proposal — code analysis (medium confidence)

    What is the root cause of that problem?
    The current frontend treats outstanding approvals as a reason to warn, not prohibit removal. It already detects report-specific approvers, selects a replacement warning, and proceeds with removal after confirmation: WorkspaceMembersPage.tsx:257–394. This explains why the App does not display the expected blocking message, but does not establish whether the backend accepted the reported removal or reassigned the report.

    What changes should we make?
    First confirm the intended behavior: block removal, or allow removal with reassignment. If blocking is required, both member-removal entry points need an outstanding-approval guard, regression coverage, and authoritative server validation. If removal is intended, verify that the pending report is reassigned correctly before changing the test expectation. No unconditional fix is verified yet.

    What alternative explanations were explored?
    This is not simply missing report-approver detection: that detection already exists. Existing WorkspaceMembersTest.tsx:568–642 explicitly supports warning-and-removal for workflow approvers, but does not establish correct handling of outstanding report-specific approvals. The helper also requires a qualifying nonarchived, processing report: ReportUtils.ts:14055–14075.

    Remaining evidence: The deletion response and resulting report approver remain unknown. Production logs were unavailable, and the inspected checkout was not verified against the reported release.

    Related issue: Workspace—Warning message not displayed when removing an approver concerns replacement-warning behavior, not the same outstanding-report blocking requirement.
    Invite dialog awaiting a second-member identity
    ❌
    Refresh persistenceUnverified: no removal was performed, and browser refresh was prohibited by the web-session rules.
    ❌

    Next Steps for Contributor+ team: Confirm whether outstanding report approvers must be blocked or reassigned before accepting an implementation plan.
    To refine: @MelvinBot <your feedback>
    To reject: Explain why you are rejecting Melvin’s analysis.


    view run · view recording

  8. yusufdeveloper2903 commented on Nov 28, 2026

    @yusufdeveloper2903
    Contributor

    @dmkt9 Melvin's analysis leaves open whether a member who only approves a report through "Change approver" should be blocked or reassigned, but #98764 (same steps) already settled that: #101047 routes these members through isApproverOfOutstandingPolicyReports to the replace-with-owner warning, and its author told QA the expected behavior was changed to that warning:

    const approverEmail = selectedEmployees.find(
    (selectedEmployee) =>
    isPolicyApprover(policy, selectedEmployee) ||
    isApproverOfOutstandingPolicyReports(policyMemberEmailsToAccountIDs[selectedEmployee], outstandingReportsForPolicy, privateIsArchivedMap),
    );
    if (approverEmail) {
    const approverAccountID = policyMemberEmailsToAccountIDs[approverEmail];
    confirmModalPrompt = translate(
    'workspace.people.removeMembersWarningPrompt',

    The video shows exactly that prompt ("we'll replace them in the approval workflow with ..., the workspace owner") before the removal, and step 11 of the regression test from the #98764 checklist expects it, while the removeMemberPromptPendingApproval copy TC-95643 checks for has had no caller since #58345 dropped the frontend block. Unless that decision is being reversed, the App matches the agreed behavior and TC-95643 needs updating, not the code.

    Happy to put up a full proposal for this if that's useful.

  9. sceptorfixit commented on Nov 29, 2026

    @sceptorfixit
  10. melvin-bot commented on Nov 29, 2026

    @melvin-bot

    📣 @sceptorfixit! 📣
    Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
    Please follow these steps:

    1. Make sure you've read and understood the contributing guidelines.
    2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
    3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
    4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
      Screen Shot 2022-11-16 at 4 42 54 PM
      Format:
    Contributor details
    Your Expensify account email: <REPLACE EMAIL HERE>
    Upwork Profile Link: <REPLACE LINK HERE>
    
  11. sceptorfixit commented on Nov 30, 2026

    @sceptorfixit
  12. melvin-bot commented on Nov 30, 2026

    @melvin-bot

    ✅ Contributor details stored successfully. Thank you for contributing to Expensify!

  13. samithreddychinni commented on Nov 30, 2026

    @samithreddychinni
  14. expensify-chore-bot commented on Dec 1, 2026

    @expensify-chore-bot

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

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

Metadata

Metadata

Assignees

Labels

BugDailyExternalOverdue

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions