Skip to content

[Due for payment 2026-10-12] Workspace - 2nd admin pay with another BA change the workspace connected BA #102967

Closed

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: 9.5.2-0
Reproducible in staging?: Yes
Reproducible in production?: N/A - new feature, doesn't exist in prod
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #101226
Email or phone of affected tester (no customers): Duytestnguyen+dk40@gmail.com
Issue reported by: Applause Internal Team
Bug source: Pull Request QA execution
Device used: Windows 11 Chrome
App Component: Money Requests

Action Performed:

Preconditions:

  • Create following accounts: Account A as Owner, invite Account B as second admin (non-payer), invite Account C as member
  • Account A workspace add a bank account (1111) and set Account A as payer
  • As Account C, create an expense and submit it to workspace chat
  • As Account A appove the expense
  • Log in as Account B to test
  1. Open https://staging.new.expensify.com/
  2. Open account C expense report
  3. Click on Pay button
  4. Select 'Pay with a bussiness bank account'
  5. Finish the Plaid flow with 0000 bank account
  6. Go to Workspace settings
  7. Click on 'Payment' tab

Expected Result:

Verify paying with a different bank account does not change the workspace's connected bank account.

Actual Result:

The workspace's connected bank account is changed into 0000 bank account instead of 1111

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7277502_1791182968680.Change_the_default_ba.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Julia Ponikarchuk
Bug ID: 7277502

Issue OwnerCurrent Issue Owner: @ikevin127

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Oct 5, 2026
  2. applause-bot commented on Oct 5, 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/9d345571fecaf06015902032e97deb353c8371e9639b958a197511f31c22331f

  3. melvin-bot commented on Oct 5, 2026

    @melvin-bot

    You have been assigned to this deploy blocker because you recently merged this PR: #101226

  4. melvin-bot commented on Oct 5, 2026

    @melvin-bot

    @MonilBhavsar @ikevin127 you have been assigned to this deploy blocker because you reviewed the offending PR: #101226

  5. melvin-bot commented on Oct 5, 2026

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  6. github-actions commented on Oct 5, 2026

    @github-actions
    Contributor

    👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  7. changed the title [-]Workspace- 2nd admin pay with another BA change the workspace connected BA[/-] [+]Workspace - 2nd admin pay with another BA change the workspace connected BA[/+] on Oct 5, 2026
  8. MelvinBot commented on Oct 5, 2026

    @MelvinBot
    Contributor

    🔍 Investigation Summary

    Classification: Frontend bug (App)
    Causing PR: Allow any workspace admin to pay reports by lorretheboy (high confidence)
    Related issue: [CFI] [$500] Allow any workspace admin to pay reports

    Recommendation: Revert

    The PR lets a non-payer admin pay on a workspace that already has a connected bank account. That admin can't access the workspace account, so "Pay with a business bank account" sends them into the workspace bank account setup flow. Finishing Plaid there replaces the workspace's account. This breaks the requirement in the linked issue and fails the PR's own QA step 4.

    You could fix forward instead, but only with a narrow guard. If the payer can't access the workspace account and the workspace already has one, the pay flow must not open workspace bank account setup or "connect existing".

    📋 Detailed analysis

    How the bug happens

    1. canAdminPayReport now allows REIMBURSEMENT_YES as well as REIMBURSEMENT_MANUAL (PolicyUtils.ts:824-829). Admin B now sees Pay (ReportPrimaryActionUtils.ts:239, ReportPreviewActionUtils.ts:140, ReportWorkflow.ts:246). Before this PR, B never saw Pay in this setup.
    2. The KYC wall treats a user as ready to pay only if the workspace's account is in their own bank account list (BaseKYCWall.tsx:339-363, WorkflowUtils.ts:755-767). B doesn't have account 1111, so this check fails.
    3. B falls through to the add-account route (BaseKYCWall.tsx:261-276). For expense reports, that route is the workspace bank account setup, carrying the workspace's policyID (SettlementButton/index.tsx:556). This line is older than the PR. The PR just made it reachable for non-payer admins.
    4. Plaid then sends ConnectBankAccountWithPlaid with that policyID (BankAccounts.ts:466-478). The call sets up the workspace account, so 0000 replaces 1111. The backend is doing what the request asks.

    Second path to cover

    QA didn't test this one. If B already has a business bank account, the KYC wall opens "connect existing business bank account". Selecting an account there calls setWorkspaceReimbursement (ConnectExistingBusinessBankAccountPage.tsx:81-97). That function sets policy.achAccount to B's account optimistically (Policy.ts:1302-1310). A fix forward must cover both paths.

    Labels

    No label changes needed. Keep DeployBlockerCash, because an App PR caused this. It's staging only, since the feature isn't in production.


    view run

  9. Nakagawa-master commented on Oct 5, 2026

    @Nakagawa-master

    This blocker makes one authority boundary explicit that is worth preserving in the fix:

    may see the Pay action
    !=
    may execute a payment with a particular funding source
    !=
    may change the workspace's configured reimbursement bank account
    

    For a non-payer workspace admin, the first can be true without granting the third. The current failure path crosses that boundary: widening Pay visibility makes the KYC/add-account fallback reachable, and that fallback carries the workspace policyID, so an attempt to obtain a usable payment source can silently become a workspace-bank reconfiguration.

    I would pin the fix with this small matrix:

    1. Workspace already has bank A; non-payer admin cannot access A and has no usable bank account -> choosing business-bank payment must not enter a flow that can replace A.
    2. Same workspace; admin has/chooses another bank B they are allowed to use -> payment may use B, but workspace bank A remains unchanged.
    3. Admin opens Pay while authorized, then the relevant payment/account permission is revoked before submit -> execution is refused against current authority, with no payment or workspace-bank side effect.
    4. Mark-as-paid remains separate from bank-account setup/reconfiguration.

    That keeps the original feature goal intact—broader action visibility—without turning presentation eligibility into authority over workspace financial configuration.

    Related earlier boundary note: #95750 (comment)

  10. 5 remaining items

  11. MonilBhavsar commented on Oct 5, 2026

    @MonilBhavsar
    Contributor

    I was not sure. I agree with your comment here #102967 (comment)

    We should allow adding new bank account, but should not replace policy preferred account, if it exists

  12. m-natarajan commented on Oct 5, 2026

    @m-natarajan

    Account B has no Pay button, Chrome / v9.5.2-3

    bandicam.2026-10-06.00-07-11-992.1.mp4
  13. puneetlath commented on Oct 5, 2026

    @puneetlath
    Contributor

    Ok, great. That's expected given what we reverted. Thanks!

  14. added and removed
    ReviewingHas a PR in review
    on Oct 5, 2026
  15. changed the title [-]Workspace - 2nd admin pay with another BA change the workspace connected BA[/-] [+][Due for payment 2026-10-12] Workspace - 2nd admin pay with another BA change the workspace connected BA[/+] on Oct 5, 2026
  16. melvin-bot commented on Oct 5, 2026

    @melvin-bot

    @ikevin127

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.2-4 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 2026-10-12. 🎊

    The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ 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]. If no checklist is needed for this issue, you can click: [no checklist button]

  17. added
    ReviewingHas a PR in review
    and removed on Oct 7, 2026
  18. ikevin127 commented on Oct 7, 2026

    @ikevin127
    Contributor

    Note

    No payment due here as this was a regression follow-up from the main issue.

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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.EngineeringReviewingHas a PR in reviewWeeklyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions