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 - "This field is required" error shows up on confirm page when submitting Scan expense #90651
Version Number: 9.3.74-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:#87920 Email or phone of affected tester (no customers):sdsdjoijdoisnjodis@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:
Precondition:
Run Onyx.merge('betas', ['newManualExpenseFlow']); in console.
Go to staging.new.expensify.com
Go to workspace chat.
Click + > Create expense > Scan.
Upload a receipt.
Click Create expense.
Expected Result:
Scan expense will be created.
Actual Result:
"This field is required" error shows up on confirm page when there is no required field.
This issue also happens when creating per diem expense.
👋 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.
PR #87920 introduced a validation guard that fires for all expense types (including scan and per diem) when the newManualExpenseFlow beta is enabled, even though the isAmountSet flag is only set via the manual amount entry path.
Assigned: @ChavdaSachin (PR author), @ShridharGoel, @puneetlath (approving reviewers) Labels: No label changes needed — DeployBlockerCash is correct (frontend App PR caused the regression); DeployBlocker is not present.
📋 Detailed Analysis
Evidence
The issue reproduces only on staging (new feature, not in production), version 9.3.74-0.
isAmountSet is set to true only inside setMoneyRequestAmount(), which is called from the inline amount input in the new manual expense flow UI. For scan expenses, the amount comes from SmartScan (a different code path that does not call setMoneyRequestAmount with isAmountSet: true), so isAmountSet remains undefined. For per diem expenses, the amount is similarly calculated from sub-rates rather than set via the inline manual entry path. When either of these expense types reaches the confirm page, isAmountSet is falsy, the validation returns 'common.error.fieldRequired', and the UI displays "This field is required" — even though the amount field is not empty and is not required in the manual sense.
The fix should either (a) skip the isAmountSet check when the expense is a scan or per diem request, or (b) ensure those code paths also set isAmountSet: true. Reverting PR #87920 is the safest and most straightforward resolution given the scope of the change.
The validation at useConfirmationValidation.ts:166-168 checks isAmountSet unconditionally for all expense types when the newManualExpenseFlow beta is enabled:
isAmountSet is only set to true when the user manually enters an amount via setMoneyRequestAmount. For scan expenses the amount comes from SmartScan (not user input), so isAmountSet is never set, and the validation incorrectly blocks submission. The same applies to per diem expenses where the amount is calculated from the subrate.
Note that the existing validation on line 163 already correctly exempts scan, time, and distance requests — the new check at line 166 just missed the same guards.
What changes do you think we should make in order to solve the problem?
Add the same expense-type exemptions to the isAmountSet check that already exist on line 163. The condition should become:
Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.
Activity
melvin-bot commentedon May 14, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #87920
melvin-bot commentedon May 14, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon May 14, 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:
OSBotify commentedon May 14, 2026
🔍 Investigation Summary
Classification: Frontend bug
Causing PR: #87920 - "Feat: Manual expense flow UI refactor - r3" by @ChavdaSachin (High confidence)
Related Issues: #82586
Recommendation: REVERT
PR #87920 introduced a validation guard that fires for all expense types (including scan and per diem) when the
newManualExpenseFlowbeta is enabled, even though theisAmountSetflag is only set via the manual amount entry path.Assigned: @ChavdaSachin (PR author), @ShridharGoel, @puneetlath (approving reviewers)
Labels: No label changes needed —
DeployBlockerCashis correct (frontend App PR caused the regression);DeployBlockeris not present.📋 Detailed Analysis
Evidence
9.3.74-0.StagingDeployCashthat touchesMoneyRequestConfirmationListvalidation.newManualExpenseFlowbeta flag is active, which directly matches the precondition in the issue.Verification
src/components/MoneyRequestConfirmationList/hooks/useConfirmationValidation.tsisAmountSetcheck at lines 166–168.Root Cause
PR #87920 added the following validation block to
useConfirmationValidation.ts:isAmountSetis set totrueonly insidesetMoneyRequestAmount(), which is called from the inline amount input in the new manual expense flow UI. For scan expenses, the amount comes from SmartScan (a different code path that does not callsetMoneyRequestAmountwithisAmountSet: true), soisAmountSetremainsundefined. For per diem expenses, the amount is similarly calculated from sub-rates rather than set via the inline manual entry path. When either of these expense types reaches the confirm page,isAmountSetis falsy, the validation returns'common.error.fieldRequired', and the UI displays "This field is required" — even though the amount field is not empty and is not required in the manual sense.The fix should either (a) skip the
isAmountSetcheck when the expense is a scan or per diem request, or (b) ensure those code paths also setisAmountSet: true. Reverting PR #87920 is the safest and most straightforward resolution given the scope of the change.nlemma commentedon May 14, 2026
Dupe of #90650
MelvinBot commentedon May 14, 2026
Proposal
What is the root cause of that problem?
The validation at
useConfirmationValidation.ts:166-168checksisAmountSetunconditionally for all expense types when thenewManualExpenseFlowbeta is enabled:isAmountSetis only set totruewhen the user manually enters an amount viasetMoneyRequestAmount. For scan expenses the amount comes from SmartScan (not user input), soisAmountSetis never set, and the validation incorrectly blocks submission. The same applies to per diem expenses where the amount is calculated from the subrate.Note that the existing validation on line 163 already correctly exempts scan, time, and distance requests — the new check at line 166 just missed the same guards.
What changes do you think we should make in order to solve the problem?
Add the same expense-type exemptions to the
isAmountSetcheck that already exist on line 163. The condition should become:This ensures the "amount required" validation only applies to manual expense types where the user is expected to enter an amount themselves.
Investigation details
Data flow:
initMoneyRequestcreates a transaction draft withamount: 0and noisAmountSetpropertysetMoneyRequestAmountis never calledvalidate()at line 166 checksisAmountSet, finds it falsy, returns'common.error.fieldRequired'AmountFieldatAmountField.tsx:96-104renders the "This field is required" errorLikely duplicate: #90650
Next Steps for Contributor+ team: Reply with
@MelvinBot implement thisto create a draft PR,@MelvinBot <your feedback>to refine this analysis, or explain why you are rejecting Melvin's proposal.