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-11-25] [$175] [CFI] Invoices - Empty invoice report fields incorrectly display required-field errors in NewDot #106798
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
NewDot incorrectly displays missing-required-field errors for empty invoice report fields. The supplied screenshots show empty Customer Address and PO Number fields highlighted in red in NewDot, while the same invoice displays those fields without errors in Expensify Classic.
Reported platforms: NewDot web, staging and production. Version: Not provided.
Steps to reproduce
Open an invoice with empty Customer Address and PO Number invoice report fields in NewDot.
View the invoice's report fields.
Open the same invoice in Expensify Classic and compare.
Expected result
Empty invoice report fields display without missing-required-field errors, consistent with Classic and the invoice exemption described in the report.
Actual result
NewDot highlights the empty fields in red and displays:
“Customer Address is required”
“PO Number is required”
Classic displays the same empty fields without errors.
Requested frontend fix
Update local report-field validation in src/libs/ReportUtils.ts to respect the invoice exemption:
Do not generate missing-required-field errors for empty invoice fields.
Preserve required-field validation for expense reports and unrelated validation.
Add regression tests covering both report types.
Acceptance criteria
Empty Customer Address and PO Number invoice fields do not display required-field errors.
Empty required fields on expense reports still display the appropriate errors.
Unrelated validation remains unchanged.
Regression tests cover invoices and expense reports.
Evidence
Comparison screenshots are available in the source Slack thread. Customer-specific invoice and payment details are omitted from this public issue.
This issue records the reported behavior and requested fix; the code path and backend exemption have not been independently verified.
Local report-field validation treats empty invoice fields like empty expense-report fields, without checking whether the report is an invoice. This generates the reported required-field messages and red highlighting.
Code evidence
getFieldViolation() returns FIELD_REQUIRED whenever the field’s value/default is empty, regardless of report type.
Report-field rendering calls this helper and translates the result into the displayed error.
What changes do you think we should make in order to solve the problem?
Pass the report into getFieldViolation() and return no missing-required-field violation when isInvoiceReport(report) is true. Update both callers above.
Keep the existing expense-report value/default checks unchanged. Do not suppress API errors, circular-reference validation, or unrelated report violations.
Regression coverage:
Empty invoice fields—including Customer Address and PO Number—remain visible without required-field errors.
Empty required expense-report fields still show errors.
Empty invoice fields do not generate report-field warning indicators.
Populated values and default-value handling remain unchanged.
Extend the report-field UI tests with invoice-specific cases, including values stored in reportNameValuePairs.
What alternative solutions did you explore? (Optional)
Skip invoice validation separately in each caller. That would work, but centralizing the exemption avoids duplicated logic and keeps field errors and warning indicators consistent.
Code-based proposal; no changes or tests were run. Classic/backend behavior was not independently verified.
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/106798#issuecomment-6840205884) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
It's used for the red error under the field in MoneyRequestViewReportFields (L164) and for the RBR in hasVisibleReportFieldViolations (L11218), and that one runs for invoice reports too (isInvoiceReport(report) ? policy?.areInvoiceFieldsEnabled : ...).
What's interesting is that the edit page already has its own idea of "required". DynamicEditReportFieldPage uses deletable (which is documented in PolicyReportField as "Tells if the field is required or not"):
So we have two different rules for the same thing. The view says every empty field is required, the edit page says only !deletable ones are. On top of that neither of them knows about the invoice exemption Classic has.
What changes do you think we should make in order to solve the problem?
Add one helper in ReportUtils and use it everywhere we decide if a report field is required:
functionisReportFieldRequired(reportField: PolicyReportField,report: OnyxEntry<Report>): boolean{// Invoice fields are never required, same as Classicif(isInvoiceReport(report)){returnfalse;}returnreportField.fieldID===CONST.REPORT_FIELD_TITLE_FIELD_ID||!reportField.deletable;}
getFieldViolation(reportField, report): return undefined early when !isReportFieldRequired(reportField, report), the rest stays as is. Update the 2 callers (MoneyRequestViewReportFields, hasVisibleReportFieldViolations) to pass the report, both already have it.
DynamicEditReportFieldPage: use isRequired={isReportFieldRequired(reportField, report)} for the text/date/dropdown pages instead of !isReportFieldDeletable, so you can actually clear an invoice field and save it empty without the form error. The Delete menu item logic stays on isReportFieldDeletable, nothing changes there.
Expense reports keep the same behaviour: fields created in NewDot are deletable: false (ReportField.ts L226) so they are still required, and the title field is unchanged.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
ReportUtilsTest:
empty invoice field -> getFieldViolation returns undefined, hasVisibleReportFieldViolations false
empty expense report field with deletable: false -> fieldRequired, RBR true
empty expense report field with deletable: true -> no violation
field with value or defaultValue -> no violation (both report types)
UI test for DynamicEditReportFieldPage: saving an empty value on an invoice field doesn't show "This field is required".
What alternative solutions did you explore? (Optional)
Only skip invoices inside getFieldViolation. It fixes the red text and the RBR, but the edit page would still refuse an empty value for the same field (and still ignore deletable), so the view and the edit page would keep disagreeing. Having one helper keeps them in sync.
📣 @SrkaLo92! 📣
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>
It exposed invoice fields to existing expense-report validation without adding an invoice exemption:
Previously, isReportFieldDisabled() always returned true for invoices. The PR removed that guard.
The renderer consequently began calling getFieldViolation() for editable invoice fields.
That validator treats empty values without defaults as required-field violations, regardless of report type.
Historical caveat: The same defect first landed in the original invoice-fields PR on June 10, but was reverted the following day. The September PR reintroduced it and is the relevant attribution for this issue.
The later inline-editing PR changed the error’s presentation, not the underlying validation behavior.
Strong code-history evidence; no browser reproduction performed.
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Activity
[-]Invoices - Empty invoice report fields incorrectly display required-field errors in NewDot[/-][+][CFI] Invoices - Empty invoice report fields incorrectly display required-field errors in NewDot[/+]trjExpensify commentedon Nov 13, 2026
@MelvinBot write a proposed solution for this.
melvin-bot commentedon Nov 13, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @DylanDylann (
External)[-][CFI] Invoices - Empty invoice report fields incorrectly display required-field errors in NewDot[/-][+][$175] [CFI] Invoices - Empty invoice report fields incorrectly display required-field errors in NewDot[/+]melvin-bot commentedon Nov 13, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022121039868249400432
MelvinBot commentedon Nov 13, 2026
Proposal
What is the root cause of that problem?
Local report-field validation treats empty invoice fields like empty expense-report fields, without checking whether the report is an invoice. This generates the reported required-field messages and red highlighting.
Code evidence
getFieldViolation()returnsFIELD_REQUIREDwhenever the field’s value/default is empty, regardless of report type.What changes do you think we should make in order to solve the problem?
Pass the report into
getFieldViolation()and return no missing-required-field violation whenisInvoiceReport(report)is true. Update both callers above.Keep the existing expense-report value/default checks unchanged. Do not suppress API errors, circular-reference validation, or unrelated report violations.
Regression coverage:
Test locations
reportNameValuePairs.What alternative solutions did you explore? (Optional)
Skip invoice validation separately in each caller. That would work, but centralizing the exemption avoids duplicated logic and keeps field errors and warning indicators consistent.
Code-based proposal; no changes or tests were run. Classic/backend behavior was not independently verified.
Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/106798#issuecomment-6840205884)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
view run
SrkaLo92 commentedon Nov 13, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
Empty invoice report fields (Customer Address, PO Number) show "X is required" in red in NewDot, while Classic shows them without errors.
What is the root cause of that problem?
getFieldViolationflags every empty field as required, it doesn't look at the report type or at the field's own required flag at all:https://github.com/Expensify/App/blob/d59adfd8/src/libs/ReportUtils.ts#L14498-L14504
It's used for the red error under the field in
MoneyRequestViewReportFields(L164) and for the RBR inhasVisibleReportFieldViolations(L11218), and that one runs for invoice reports too (isInvoiceReport(report) ? policy?.areInvoiceFieldsEnabled : ...).What's interesting is that the edit page already has its own idea of "required".
DynamicEditReportFieldPageusesdeletable(which is documented inPolicyReportFieldas "Tells if the field is required or not"):https://github.com/Expensify/App/blob/d59adfd8/src/pages/DynamicEditReportFieldPage.tsx#L139
So we have two different rules for the same thing. The view says every empty field is required, the edit page says only
!deletableones are. On top of that neither of them knows about the invoice exemption Classic has.What changes do you think we should make in order to solve the problem?
Add one helper in
ReportUtilsand use it everywhere we decide if a report field is required:getFieldViolation(reportField, report): returnundefinedearly when!isReportFieldRequired(reportField, report), the rest stays as is. Update the 2 callers (MoneyRequestViewReportFields,hasVisibleReportFieldViolations) to pass the report, both already have it.DynamicEditReportFieldPage: useisRequired={isReportFieldRequired(reportField, report)}for the text/date/dropdown pages instead of!isReportFieldDeletable, so you can actually clear an invoice field and save it empty without the form error. The Delete menu item logic stays onisReportFieldDeletable, nothing changes there.Expense reports keep the same behaviour: fields created in NewDot are
deletable: false(ReportField.tsL226) so they are still required, and the title field is unchanged.What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
ReportUtilsTest:getFieldViolationreturns undefined,hasVisibleReportFieldViolationsfalsedeletable: false->fieldRequired, RBR truedeletable: true-> no violationUI test for
DynamicEditReportFieldPage: saving an empty value on an invoice field doesn't show "This field is required".What alternative solutions did you explore? (Optional)
Only skip invoices inside
getFieldViolation. It fixes the red text and the RBR, but the edit page would still refuse an empty value for the same field (and still ignoredeletable), so the view and the edit page would keep disagreeing. Having one helper keeps them in sync.melvin-bot commentedon Nov 13, 2026
📣 @SrkaLo92! 📣
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:
SrkaLo92 commentedon Nov 13, 2026
Contributor details
Your Expensify account email: srdjanmarinkovic31@gmail.com
Upwork Profile Link: https://www.upwork.com/freelancers/srdjanmarinkovic
melvin-bot commentedon Nov 13, 2026
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
20 remaining items
melvin-bot commentedon Nov 24, 2026
@DylanDylann I sent you a Slack DM to connect GitHub. I will continue the original request once you are connected.
MelvinBot commentedon Nov 24, 2026
The offending PR is Implement invoice fields feature, merged September 9, 2026.
It exposed invoice fields to existing expense-report validation without adding an invoice exemption:
isReportFieldDisabled()always returnedtruefor invoices. The PR removed that guard.getFieldViolation()for editable invoice fields.Historical caveat: The same defect first landed in the original invoice-fields PR on June 10, but was reverted the following day. The September PR reintroduced it and is the relevant attribution for this issue.
The later inline-editing PR changed the error’s presentation, not the underlying validation behavior.
Strong code-history evidence; no browser reproduction performed.
view run
expensify-chore-bot commentedon Nov 24, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)expensify-chore-bot commentedon Nov 24, 2026
Payment Summary
Resolving PRs:
Avoid required-field errors on empty invoice report fields #107076
Reviewer: @DylanDylann owed $175 via NewDot
BugZero Checklist (@mallenexpensify)
expensify-chore-bot commentedon Nov 27, 2026
@mallenexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
mallenexpensify commentedon Nov 30, 2026
Matt's AI agent:
Prep notes for the CM. This is not a payment approval. Do not request payment until the CM posts the final amount.
Ready.
Job price: $175.
Price basis: standard, no Help Wanted.
Next: press Caps+Y, then pay.
Evidence
PAYPREP v1mallenexpensify commentedon Nov 30, 2026
Payment Summary
Contributor+: @DylanDylann due $175 via NewDot