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 2026-07-16] Expense - Pay button is not shown for payments admin when payments admin is the payer #95561
Version Number: 9.4.29-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:#92787 Email or phone of affected tester (no customers):jsdionjsodjiosdjosjojdis2@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.5 / Chrome App Component: Money Requests
Action Performed:
Precondition:
Create a Control workspace.
Invite user as payments admin to the workspace.
Change Payer to payments admin in workspace settings > Workflows > Payer.
Go to staging.new.expensify.com
[Payments admin] Create an expense in workspace chat.
[Payments admin] Click Submit.
[Owner] Approve payments admin's report.
[Payments admin] Open the report.
Expected Result:
Pay button should appear for payments admin when payments admin is the payer.
Actual Result:
Pay button is not shown for payments admin when payments admin is the payer.
👋 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:
Identify the pull request that introduced this issue and revert it.
Root Cause: A "payments admin" has the policy role paymentsAdmin, which is notadmin. Every payer-eligibility path rewritten by PR #92787 gates the manual‑reimbursement case on the full admin role, so a designated payer who is a paymentsAdmin (rather than an owner/admin) fails every check and the Pay button is hidden.
Introduced by #92787 ("Allow manual reimbursement workspaces to set and use a preferred payer"). Confidence: high (code evidence).
Recommended Fix: In the manual-reimbursement branches, treat the current user as an eligible payer when they are the designated payer, without requiring the admin role — and read the persisted payer from policy.reimburser (what setWorkspacePayer writes), not only policy.achAccount?.reimburser. Concretely:
isPayer — ReportUtils.ts:2860: isReimburser = currentUserEmailParam === reimburserEmail && isAdmin — drop the && isAdmin for the manual designated‑payer case (or also accept role === PAYMENTS_ADMIN).
Given this is a deploy blocker, reverting #92787 is a safe fallback if a targeted fix can't be verified quickly.
Investigation details & evidence
Repro: Control workspace → invite user as a payments admin → set them as Payer in Workflows → they submit an expense → owner approves → payments admin opens the report → no Pay button. Workspace has no bank account (reimbursementChoice = REIMBURSEMENT_MANUAL).
Manual branch returns isReimburser, and isReimburser requires && isAdmin → false even when the user is the designated reimburser.
The caller fallbacks (... || (MANUAL && isPolicyAdmin(policy))) also return false because isPolicyAdmin is false for a paymentsAdmin. So getReportPrimaryAction never returns PAY and the report‑preview/badge Pay actions are hidden too.
Regression: Before #92787, the manual branch was simply return isAdmin (any admin could pay). After #92787 it became "only the designated reimburser, who must be an admin" — which excludes a paymentsAdmin payer entirely.
Secondary risk: all reads use policy.achAccount?.reimburser ?? policy.owner and ignore top‑level policy.reimburser. If the backend doesn't persist achAccount.reimburser without a connected bank account, reimburserEmail silently falls back to policy.owner, so even an admin designated payer who isn't the owner could be missed. Worth confirming with an Onyx snapshot / backend check of what SetWorkspacePayer persists when there's no bank account.
Test gap: the new tests in tests/unit/ReportUtilsTest.ts and tests/actions/IOUTest/ReportWorkflowTest.ts all set the viewer's role to ADMIN and populate achAccount.reimburser. No test covers a paymentsAdmin designated payer on a no‑bank‑account manual workspace — which is exactly the shipped regression.
⚠️ Note for maintainers: the fix_pay_btn.zip attachment posted above by an unrecognized account is unsolicited — please don't download or run it. Vague "here's a quick patch" zip attachments from new accounts are a common malware / social‑engineering vector.
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/95561) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
changed the title [-]Expense - Pay button is not shown for payments admin when payments admin is the payer[/-][+][Due for payment 2026-07-16] Expense - Pay button is not shown for payments admin when payments admin is the payer[/+]on Jul 9, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.31-0 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@dmkt9 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]. If no checklist is needed for this issue, you can click: [no checklist button]
@dmkt9 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]. If no checklist is needed for this issue, you can click: [no checklist button]
Activity
applause-bot commentedon Jul 8, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/29f3f3daf18c495b47b9662d3fb7d9f74886ad7f28a4bfcdd6d27b396df1c3fe
melvin-bot commentedon Jul 8, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #92787
melvin-bot commentedon Jul 8, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Jul 8, 2026
👋 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:
dmkt9 commentedon Jul 8, 2026
@jponikarchuk This is a duplicate of #95537MelvinBot commentedon Jul 8, 2026
Issue Analysis
Root Cause: A "payments admin" has the policy role
paymentsAdmin, which is notadmin. Every payer-eligibility path rewritten by PR #92787 gates the manual‑reimbursement case on the fulladminrole, so a designated payer who is apaymentsAdmin(rather than an owner/admin) fails every check and the Pay button is hidden.Introduced by #92787 ("Allow manual reimbursement workspaces to set and use a preferred payer"). Confidence: high (code evidence).
Recommended Fix: In the manual-reimbursement branches, treat the current user as an eligible payer when they are the designated payer, without requiring the
adminrole — and read the persisted payer frompolicy.reimburser(whatsetWorkspacePayerwrites), not onlypolicy.achAccount?.reimburser. Concretely:isPayer— ReportUtils.ts:2860:isReimburser = currentUserEmailParam === reimburserEmail && isAdmin— drop the&& isAdminfor the manual designated‑payer case (or also acceptrole === PAYMENTS_ADMIN).MANUAL && isPolicyAdmin(policy)fallbacks incanPay(ReportPreviewActionUtils.ts:130),isPrimaryPayAction(ReportPrimaryActionUtils.ts:228), andcanIOUBePaid(ReportWorkflow.ts:224) also need to recognize apaymentsAdmindesignated payer, not justisPolicyAdmin.Given this is a deploy blocker, reverting #92787 is a safe fallback if a targeted fix can't be verified quickly.
Investigation details & evidence
Repro: Control workspace → invite user as a payments admin → set them as Payer in Workflows → they submit an expense → owner approves → payments admin opens the report → no Pay button. Workspace has no bank account (
reimbursementChoice = REIMBURSEMENT_MANUAL).Why it fails, step by step:
paymentsAdminis a distinct role fromadmin(CONST.POLICY.ROLE.PAYMENTS_ADMIN = 'paymentsAdmin'). InisPayer,isAdmin = policy?.role === CONST.POLICY.ROLE.ADMINis therefore false for a payments admin.isReimburser, andisReimburserrequires&& isAdmin→ false even when the user is the designated reimburser.... || (MANUAL && isPolicyAdmin(policy))) also return false becauseisPolicyAdminis false for apaymentsAdmin. SogetReportPrimaryActionnever returnsPAYand the report‑preview/badge Pay actions are hidden too.Regression: Before #92787, the manual branch was simply
return isAdmin(any admin could pay). After #92787 it became "only the designated reimburser, who must be an admin" — which excludes apaymentsAdminpayer entirely.Secondary risk: all reads use
policy.achAccount?.reimburser ?? policy.ownerand ignore top‑levelpolicy.reimburser. If the backend doesn't persistachAccount.reimburserwithout a connected bank account,reimburserEmailsilently falls back topolicy.owner, so even an admin designated payer who isn't the owner could be missed. Worth confirming with an Onyx snapshot / backend check of whatSetWorkspacePayerpersists when there's no bank account.Test gap: the new tests in
tests/unit/ReportUtilsTest.tsandtests/actions/IOUTest/ReportWorkflowTest.tsall set the viewer's role toADMINand populateachAccount.reimburser. No test covers apaymentsAdmindesignated payer on a no‑bank‑account manual workspace — which is exactly the shipped regression.Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/95561)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
1 remaining item
melvin-bot commentedon Jul 8, 2026
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.
grgia commentedon Jul 8, 2026
requested retest - https://expensify.slack.com/archives/D0AL2GKRC0K/p1783534958311179
IuliiaHerets commentedon Jul 9, 2026
Issue is not reproducible on Windows 11 / Chrome in v9.4.29-3 and on Xiaomi Poco F5 / Android 13 in v9.4.29-3
bandicam.2026-07-09.15-17-30-935.mp4
1000210465.mp4
[-]Expense - Pay button is not shown for payments admin when payments admin is the payer[/-][+][Due for payment 2026-07-16] Expense - Pay button is not shown for payments admin when payments admin is the payer[/+]melvin-bot commentedon Jul 9, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Jul 9, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.31-0 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-07-16. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Jul 9, 2026
@dmkt9 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]. If no checklist is needed for this issue, you can click: [no checklist button]
melvin-bot commentedon Jul 10, 2026
@dmkt9 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]. If no checklist is needed for this issue, you can click: [no checklist button]