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
Expense - IOU sender can pay the expense and error shows up #95535
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):jsnoidjosddijsojidsoj@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:
Go to staging.new.expensify.com
Open 1:1 DM with any user.
Submit an expense to the user.
Click Mark as paid.
Expected Result:
IOU sender should not be able to pay the expense.
Actual Result:
IOU sender can pay the expense and error shows up.
👋 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.
⚠️Note on the uploaded fix_iou_state.zip: it was posted by a brand-new account with no contributor history and social-engineering-style wording. Please do not download or run it — patches should come as a PR that can be reviewed in the open, not an executable zip.
TL;DR: Based on code analysis, linked PR #92787 does not change the pay-button logic for a plain 1:1 DM IOU, so a straight revert likely won't fix this. The repro (a DM) also doesn't match that PR's feature (workspace preferred payer). This needs a quick runtime check of the actual report before picking a resolution.
What the PR changed (and why it's inert for a DM IOU): PR #92787 broadened the pay gate so a non-payer admin can pay in a manual-reimbursement workspace. Every new clause is guarded by policy?.reimbursementChoice === MANUAL && isPolicyAdmin(policy):
A 1:1 DM IOU has no real policy, so reimbursementChoice is undefined and isPolicyAdmin(undefined) is false → each clause collapses back to the pre-PR isReportPayer. And isPayer for a DM IOU falls through to the unchanged line ReportUtils.ts:2887: return isAdmin || (isMoneyRequestReport(iouReport) && isManager);. For the submitter of a request, isAdmin is false and isManager is false (the submitter is ownerAccountID; the recipient is managerID), so the Pay action should not appear — same as before the PR.
Two candidate root causes — please verify which:
If the repro is truly a bare DM (no workspace): PR [Payment due @dmkt9] Allow manual reimbursement workspaces to set and use a preferred payer #92787 is likely not the cause — the report may be mislinked, or the real trigger is a mis-set managerID (the only way isPayer returns true for the submitter is managerID === current user). Check the actual iouReport.managerID vs ownerAccountID vs the current account in Onyx.
If a manual-reimbursement workspace is involved: the PR intentionally lets any policy admin (not just the designated payer) see Pay. If the backend still rejects non-designated payers, that produces exactly "Pay button shows → error." That would make the PR the cause and point the fix at the canNonPayerAdminPay broadening above.
Investigation details & evidence
IOU data model: buildOptimisticIOUReport sets managerID = payerAccountID, ownerAccountID = payeeAccountID — so "submit an expense to a user" makes the current user the payee/owner and the other user the manager/payer. isManager is therefore false for the submitter.
Confidence: high that the changed lines are inert for a bare DM IOU; medium overall on root cause because it depends on the actual report's managerID/attached policy, which needs runtime confirmation.
Analyzed against main @ 74caf6328d8e8913d7f66928273fa6484dea4ab1.
Reply @MelvinBot <feedback> (e.g. paste the report's managerID/owner/policy) to refine, or @MelvinBot implement this once the correct root cause is confirmed.
Activity
applause-bot commentedon Jul 7, 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/60ecf1fa3b9ac2de87b135a3020d9642821e6feb4d1f2516cfd1471117ee10b1
melvin-bot commentedon Jul 7, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #92787
melvin-bot commentedon Jul 7, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Jul 7, 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:
mjasikowski commentedon Jul 7, 2026
@NikkiWines this comes from #92787
MelvinBot commentedon Jul 7, 2026
Issue Analysis
TL;DR: Based on code analysis, linked PR #92787 does not change the pay-button logic for a plain 1:1 DM IOU, so a straight revert likely won't fix this. The repro (a DM) also doesn't match that PR's feature (workspace preferred payer). This needs a quick runtime check of the actual report before picking a resolution.
What the PR changed (and why it's inert for a DM IOU): PR #92787 broadened the pay gate so a non-payer admin can pay in a manual-reimbursement workspace. Every new clause is guarded by
policy?.reimbursementChoice === MANUAL && isPolicyAdmin(policy):ReportWorkflow.ts:235(canIOUBePaid)ReportPrimaryActionUtils.ts:228(isPrimaryPayAction)ReportPreviewActionUtils.ts:130(canPay)A 1:1 DM IOU has no real policy, so
reimbursementChoiceisundefinedandisPolicyAdmin(undefined)isfalse→ each clause collapses back to the pre-PRisReportPayer. AndisPayerfor a DM IOU falls through to the unchanged lineReportUtils.ts:2887:return isAdmin || (isMoneyRequestReport(iouReport) && isManager);. For the submitter of a request,isAdminis false andisManageris false (the submitter isownerAccountID; the recipient ismanagerID), so the Pay action should not appear — same as before the PR.Two candidate root causes — please verify which:
managerID(the only wayisPayerreturns true for the submitter ismanagerID === current user). Check the actualiouReport.managerIDvsownerAccountIDvs the current account in Onyx.canNonPayerAdminPaybroadening above.Investigation details & evidence
buildOptimisticIOUReportsetsmanagerID = payerAccountID,ownerAccountID = payeeAccountID— so "submit an expense to a user" makes the current user the payee/owner and the other user the manager/payer.isManageris therefore false for the submitter.isPayerdiff in PR [Payment due @dmkt9] Allow manual reimbursement workspaces to set and use a preferred payer #92787 only restructured theisPaidGroupPolicybranch; the DM/personal fallback return line is a context (unchanged) line in the diff.hasOutstandingChildRequestwas tightened (added anisPayerguard), which can only remove a Pay indicator, not add one.managerID/attached policy, which needs runtime confirmation.Analyzed against
main@74caf6328d8e8913d7f66928273fa6484dea4ab1.Next Steps for Contributor+ team:
managerID,ownerAccountID, andpolicy.reimbursementChoice). That decides between candidate 1 (mislinked /managerIDbug) and candidate 2 (PR [Payment due @dmkt9] Allow manual reimbursement workspaces to set and use a preferred payer #92787's non-payer-admin broadening).@MelvinBot <feedback>(e.g. paste the report's managerID/owner/policy) to refine, or@MelvinBot implement thisonce the correct root cause is confirmed.NikkiWines commentedon Jul 7, 2026
I'm not able to reproduce this on staging:
IOU Sender: Cannot pay, this matches expected result: IOU sender should not be able to pay the expense. ✅
Screen.Recording.2026-07-07.at.22.40.51.mov
IOU Recipient: Can pay without error ✅
https://github.com/user-attachments/assets/35a16968-cb23-4d0e-a25e-5cb9d40bb667
@lanitochka17 can you confirm if there are any other steps that need to be taken to reproduce this?
lanitochka17 commentedon Jul 8, 2026
@NikkiWines Issue is not repro now
Screen.Recording.2026-07-08.at.22.27.21.mov
grgia commentedon Jul 8, 2026
Removing blocker label, will leave open
NikkiWines commentedon Jul 8, 2026
I think we can close this if the issue is not reproducible! @grgia feel free to reopen if you disagree!