Repository navigation
Avoid required-field errors on empty invoice report fields - #107076
Conversation
Co-authored-by: DylanDylann <DylanDylann@users.noreply.github.com>
|
|
|
|
|
🤖 Web test steps verification results: ❌ fail Blocked on dev NewDot web: invoice and expense-report fixtures remain unavailable. These results indicate blocked verification, not confirmed validation defects.
|
|
The actionable failure is unrelated to this PR, so I did not push changes.
All Jest shards, lint, formatting, typechecking, React Compiler, and Storybook checks passed. |
|
@MelvinBot Why do you assume all fields in the invoice report are optional? |
|
I shouldn’t have assumed that. I took the issue’s stated invoice exemption as a confirmed rule, even though it explicitly says the exemption wasn’t independently verified. The reported Customer Address and PO Number behavior doesn’t establish that every invoice field is optional. The new guard nevertheless skips required-field validation for every invoice field. The added tests merely encode that assumption; they don’t validate the product requirement. We need to establish which invoice fields are actually required and preserve validation for those, rather than apply a blanket invoice exemption. My proposal overstated the evidence. |
|
@MelvinBot Mark as ready and fill QA steps |
|
Marked ready for review and filled QA steps with invoice checks, expense-report regressions, and value/default handling. QA remains unverified; the blanket invoice exemption is explicitly flagged as an unresolved review concern. |
|
@DylanDylann Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Reviewer Checklist
Screenshots/Videos |
|
@MelvinBot Please use this QA test steps Precondition:
Invoice fields (the fix)
|
|
Replaced the QA section with your exact preconditions and 10 steps. The PR remains ready for review. |
|
@MelvinBot Fill all checkbox in the author checklist |
|
Checked all author checklist boxes on your behalf, preserving the existing text. No additional tests were run. |
|
We did not find an internal engineer to review this PR, trying to assign a random engineer to #106798 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
|
Rechecked: the same two checks remain failing.
All automated code-quality and test checks pass. No changes pushed, because the build failure is unrelated to this PR and needs a separate fix. |
|
@DylanDylann wanna try merging main for the failing build test? |
|
@MelvinBot Can you merge the latest main? |
Co-authored-by: DylanDylann <DylanDylann@users.noreply.github.com>
|
@DylanDylann @carlosmiceli One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
🚧 carlosmiceli has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
@carlosmiceli looks like this was merged without a test passing. These checks had not passed on 3a558a8 when it was merged:
Please add a note explaining why this was done and remove the |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/carlosmiceli in version: 9.5.41-0 🚀
|
|
No help site update needed — this PR removes required-field errors and warning indicators from empty invoice fields; it adds no new workflow and makes no existing article sentence incorrect. |
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.5.41-2 🚀
Bundle Size Analysis (Sentry): |
I assume tests were displaying a pass and that's why I merged it, regardless not an emergency. |










Explanation of Change
Invoice report fields are exempt from missing-required-field validation. Pass report context into the shared validation helper and both callers so inline errors and report-field warning indicators agree, while preserving expense-report value/default validation.
Adds invoice/expense regression coverage for empty, saved, and default values, and invoice UI coverage including fields stored in report name-value pairs. This implements the approved proposal without changing unrelated validation or edit-page behavior.
AI Tests
Main merge verification (2026-11-17): Merged main at
97eb89360893fb62274cd4b9409f2180a3d1c919without conflicts. On the final merged tree, both affected Jest suites passed (1,740 tests) and typechecking passed. The full Jest run timed out after two minutes with no failures reported before timeout; the final lint rerun timed out after ten minutes. Lint, lint-changed, and Storybook smoke checks passed on the earlier merge candidate before main advanced during verification. Theprettiernpm script is unavailable; the commit hook's staged-file formatter passed. React Compiler's changed-file command failed resolvingorigin/, and the translation dry-run could not start because ts-node failed loading TypeScript. No new browser or native-build verification was performed.Original implementation verification:
npm run lint,npm run lint-changed,npm run typecheck,npm run spell-changed, and Storybook smoke test.check-changedattempted to resolve the invalid base reforigin/; the matrix'sprettiernpm script no longer exists. The direct component compiler check and repository formatter passed instead.Contributor branch access
Created on an upstream branch because Melvin cannot push to the requester's fork. To move the branch to your fork:
You can then close this draft and open a replacement from your fork.
Fixed Issues
$ #106798
PROPOSAL: #106798 (comment)
Tests
// TODO: The human co-author must fill out the tests you ran before marking this PR as "ready for review"
// Please describe what tests you performed that validates your changed worked.
Offline tests
QA Steps
Precondition:
Invoice fields (the fix)
PO NumberandCustomer Address. Leave the initial value empty for both.PO NumberandCustomer Addressare shown, empty, with no red outline and no "is required" error.PO Number, then click outside the field. Verify the value saves and no error shows.PO Numberagain and click outside the field. Verify the field is empty and no error shows.PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Web fixture blocker (not evidence that the invoice validation passed):
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari