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-09-16] [$250] Expense - No approval options when expense with 0.00 amount is held #83259
Version Number: 9.3.25-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:#70825 Email or phone of affected tester (no customers):jsodjsodnjoisjdosij@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.2 / Chrome App Component: Money Requests
Action Performed:
Go to staging.new.expensify.com
Go to workspace chat.
Create an expense with 0.00 amount.
Create another expense with negative amount.
Open the expense report.
Hold the expense with 0.00 amount.
Go back to workspace chat.
Click Submit.
Click Approve button.
Expected Result:
Approve dropdown button will give options to approve pending amount or full amount.
👋 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.
Please re-state the problem that we are trying to solve in this issue.
When an expense report contains a $0.00 held expense alongside a negative-amount expense, clicking the Approve button auto-approves the full report without showing any approval options (partial vs full). The expected behavior is a dropdown presenting "Approve only $X" (non-held amount) and "Approve $Y" (full amount) options.
What is the root cause of that problem?
PR #70825 introduced ExpenseHeaderApprovalButton, which replaced the old ProcessMoneyReportHoldMenu (DecisionModal) for approval confirmations. The new component builds a dropdown with partial/full options via getApprovalDropdownOptions, but only renders the dropdown when approvalOptions.length > 1. When there's only 1 option, it falls through to a plain Button that calls onApprove(true) (full approval) immediately.
The issue is in how hasValidNonHeldAmount is computed in getNonHeldAndFullAmount (ReportUtils.ts:10618-10623):
When a $0.00 expense is held, holding it does not change unheldTotal (since transactionAmount = 0), so unheldTotal === total. This means Math.abs(adjustedUnheldTotal) === Math.abs(adjustedTotal), causing the fallback condition to fail. If adjustedUnheldTotal is also negative (which it is for expense reports with negative amounts), the first condition (>= 0) also fails. Result: hasValidNonHeldAmount = false.
With hasValidNonHeldAmount = false, getApprovalDropdownOptions (ExpenseHeaderApprovalButton.tsx:73) skips the partial-approve option, producing only 1 option. The check at line 122 (approvalOptions.length > 1) fails, and the component renders a plain Button that auto-approves without any confirmation.
What changes do you think we should make in order to solve the problem?
In ExpenseHeaderApprovalButton.tsx, when shouldShowDropdown is true (held expenses exist) but only 1 approval option is generated (e.g., the $0 held edge case), the component should still show a confirmation UI rather than silently auto-approving. Two approaches:
Show the dropdown even with 1 option when shouldShowDropdown is true: Change the condition at line 122 from approvalOptions.length > 1 to just check shouldShowDropdown, and always use the ButtonWithDropdownMenu (which already has shouldAlwaysShowDropdownMenu=true). This ensures the user sees a confirmation before approving held expenses.
Fix the hasValidNonHeldAmount calculation to handle the case where unheldTotal === total (held amount is $0) by recognizing that there ARE held expenses even when the amounts are identical. This would produce 2 options and the dropdown would render naturally.
Option 1 is the safer, more minimal fix since it addresses the symptom directly: any time held expenses exist, the user should see a confirmation before approving.
What alternative solutions did you explore? (Optional)
Fixing the !!expenseReport.unheldTotal truthiness check in approveMoneyRequest (IOU/index.ts:10548) — this has the same falsy-zero bug but is a secondary issue since the UI already skips showing options.
Holding a $0 expense doesn't change unheldTotal (Hold.ts:115): transactionAmount = 0 * coefficient = 0, so unheldTotal = total - 0 = total.
hasValidNonHeldAmount evaluates to false (ReportUtils.ts:10618-10623): Since unheldTotal === total, the absolute values are equal, and for expense reports with negative adjustedUnheldTotal, both conditions fail.
Only 1 dropdown option is generated (ExpenseHeaderApprovalButton.tsx:73-81): The partial-approve option requires nonHeldAmount && hasValidNonHeldAmount && !hasOnlyHeldExpenses. With hasValidNonHeldAmount = false, the partial option is skipped.
src/components/MoneyReportHeader.tsx:1019-1025 - onApprove handler that bypasses confirmation
Implementation Notes
The shouldAlwaysShowDropdownMenu prop is already passed to ButtonWithDropdownMenu in the dropdown path, so using it with 1 option should work
The secondary actions menu (3-dot menu) has its own approval submenu logic that may also need the same fix
The !!expenseReport.unheldTotal check in approveMoneyRequest should be changed to a proper comparison (e.g., expenseReport.unheldTotal !== undefined && expenseReport.unheldTotal !== null) as a separate fix
Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, or @MelvinBot <your feedback> to refine this analysis.
📣 @AbdulSalaamazimi! 📣
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:
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.
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.
Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.74-2 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-09-16. 🎊
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]
changed the title [-][$250] Expense - No approval options when expense with 0.00 amount is held[/-][+][Due for payment 2026-09-16] [$250] Expense - No approval options when expense with 0.00 amount is held[/+]on Sep 9, 2026
Activity
melvin-bot commentedon Feb 23, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #70825
melvin-bot commentedon Feb 23, 2026
💬 A slack conversation has been started in #expensify-open-source
melvin-bot commentedon Feb 23, 2026
Triggered auto assignment to @greg-schroeder (
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.github-actions commentedon Feb 23, 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:
MelvinBot commentedon Feb 23, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
When an expense report contains a $0.00 held expense alongside a negative-amount expense, clicking the Approve button auto-approves the full report without showing any approval options (partial vs full). The expected behavior is a dropdown presenting "Approve only $X" (non-held amount) and "Approve $Y" (full amount) options.
What is the root cause of that problem?
PR #70825 introduced
ExpenseHeaderApprovalButton, which replaced the oldProcessMoneyReportHoldMenu(DecisionModal) for approval confirmations. The new component builds a dropdown with partial/full options viagetApprovalDropdownOptions, but only renders the dropdown whenapprovalOptions.length > 1. When there's only 1 option, it falls through to a plainButtonthat callsonApprove(true)(full approval) immediately.The issue is in how
hasValidNonHeldAmountis computed ingetNonHeldAndFullAmount(ReportUtils.ts:10618-10623):When a $0.00 expense is held, holding it does not change
unheldTotal(sincetransactionAmount = 0), sounheldTotal === total. This meansMath.abs(adjustedUnheldTotal) === Math.abs(adjustedTotal), causing the fallback condition to fail. IfadjustedUnheldTotalis also negative (which it is for expense reports with negative amounts), the first condition (>= 0) also fails. Result:hasValidNonHeldAmount = false.With
hasValidNonHeldAmount = false,getApprovalDropdownOptions(ExpenseHeaderApprovalButton.tsx:73) skips the partial-approve option, producing only 1 option. The check at line 122 (approvalOptions.length > 1) fails, and the component renders a plain Button that auto-approves without any confirmation.What changes do you think we should make in order to solve the problem?
In
ExpenseHeaderApprovalButton.tsx, whenshouldShowDropdownis true (held expenses exist) but only 1 approval option is generated (e.g., the $0 held edge case), the component should still show a confirmation UI rather than silently auto-approving. Two approaches:Show the dropdown even with 1 option when
shouldShowDropdownis true: Change the condition at line 122 fromapprovalOptions.length > 1to just checkshouldShowDropdown, and always use theButtonWithDropdownMenu(which already hasshouldAlwaysShowDropdownMenu=true). This ensures the user sees a confirmation before approving held expenses.Fix the
hasValidNonHeldAmountcalculation to handle the case whereunheldTotal === total(held amount is $0) by recognizing that there ARE held expenses even when the amounts are identical. This would produce 2 options and the dropdown would render naturally.Option 1 is the safer, more minimal fix since it addresses the symptom directly: any time held expenses exist, the user should see a confirmation before approving.
What alternative solutions did you explore? (Optional)
!!expenseReport.unheldTotaltruthiness check inapproveMoneyRequest(IOU/index.ts:10548) — this has the same falsy-zero bug but is a secondary issue since the UI already skips showing options.ProcessMoneyReportHoldMenuflow for approvals — this was intentionally replaced by PR Clarify Approval Options When Held Expenses Exist #70825, so reverting would undo the intended UX improvement.Detailed Investigation
Evidence Chain
Holding a $0 expense doesn't change
unheldTotal(Hold.ts:115):transactionAmount = 0 * coefficient = 0, sounheldTotal = total - 0 = total.hasValidNonHeldAmountevaluates tofalse(ReportUtils.ts:10618-10623): SinceunheldTotal === total, the absolute values are equal, and for expense reports with negative adjustedUnheldTotal, both conditions fail.Only 1 dropdown option is generated (
ExpenseHeaderApprovalButton.tsx:73-81): The partial-approve option requiresnonHeldAmount && hasValidNonHeldAmount && !hasOnlyHeldExpenses. WithhasValidNonHeldAmount = false, the partial option is skipped.Dropdown doesn't render (
ExpenseHeaderApprovalButton.tsx:122):approvalOptions.length > 1isfalse, soButtonWithDropdownMenuis not used.Plain Button auto-approves (
ExpenseHeaderApprovalButton.tsx:139-147): Falls through toonApprove(true)which callsapproveMoneyRequestwith full approval.Relevant Code
src/components/ExpenseHeaderApprovalButton.tsx:59-147- Core approval button logic with the bugsrc/libs/ReportUtils.ts:10599-10630-getNonHeldAndFullAmountwithhasValidNonHeldAmountcalculationsrc/libs/actions/IOU/Hold.ts:107-118- Hold action that doesn't changeunheldTotalfor $0src/libs/actions/IOU/index.ts:10545-10550- Secondary!!unheldTotaltruthiness bugsrc/components/MoneyReportHeader.tsx:1019-1025-onApprovehandler that bypasses confirmationImplementation Notes
shouldAlwaysShowDropdownMenuprop is already passed toButtonWithDropdownMenuin the dropdown path, so using it with 1 option should work!!expenseReport.unheldTotalcheck inapproveMoneyRequestshould be changed to a proper comparison (e.g.,expenseReport.unheldTotal !== undefined && expenseReport.unheldTotal !== null) as a separate fixNext Steps for Contributor+ team: Reply with
@MelvinBot implement thisto create a draft PR, or@MelvinBot <your feedback>to refine this analysis.10 remaining items
melvin-bot commentedon Feb 24, 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.
marcochavezf commentedon Feb 24, 2026
Requested retest here https://expensify.slack.com/archives/C09V78U42D8/p1771955045610439
IuliiaHerets commentedon Feb 24, 2026
@marcochavezf Windows 10/ Chrome
v9.3.25-9
Not Repro
repro.-.issue.83259.mp4
melvin-bot commentedon Feb 26, 2026
📣 @AbdulSalaamazimi! 📣
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:
Format:
nabi-ebrahimi commentedon Feb 26, 2026
Hi @marcochavezf, I am able to reproduce the issue. Could you please re-open this issue. thanks.
3.mp4
jponikarchuk commentedon Sep 8, 2026
Deploy Blocker #100639 was identified to be related to the PR #83667 that attempted to fix this issue.
melvin-bot commentedon Sep 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.
melvin-bot commentedon Sep 9, 2026
@ahmedGaber93
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.74-2 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-09-16. 🎊
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]
[-][$250] Expense - No approval options when expense with 0.00 amount is held[/-][+][Due for payment 2026-09-16] [$250] Expense - No approval options when expense with 0.00 amount is held[/+]