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-08-17] Rules - "Please select at least one field" is shown when all fields are selected #97560
Version Number: 9.4.47-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:#96591 Email or phone of affected tester (no customers):applausetester+ssndjois2jd1@applause.expensifail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.5 / Chrome App Component: Workspace Settings
Action Performed:
Precondition:
Log in with Expensifail account.
Enable Rules.
Go to staging.new.expensify.com
Go to workspace settings > Categories.
Open any category.
Click Create new rule > Field requirements.
Select Require for all fields > Save rule.
Click Create new rule > Field requirements.
Select Require for all fields > Save rule.
Expected Result:
Rule should be saved.
Actual Result:
"Please select at least one field" is shown when all fields are selected.
👋 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.
Classification: Frontend bug (fix is entirely in Expensify/App) Causing PR: #96591 - "Add contextual Category rules section to category details RHP" by @Krishna2323 (Medium-High confidence) Related Issues: #92742 (the feature issue this PR implemented)
Recommendation: ROLL FORWARD
The blocker is surfaced by a pre-existing validation quirk that #96591's new category-scoped "Create new rule" flow makes reachable. A targeted fix (differentiate "nothing selected" from "already required") is far narrower and safer than reverting the whole contextual-rules feature, and the revert would remove otherwise-working functionality. REVERT of #96591 is a viable fallback if a fix cannot land quickly.
Assigned: @Krishna2323 (PR author), @JS00001 and @situchan (approving reviewers) — already assigned by Melvin. Labels: No changes. Only DeployBlockerCash is present; this is a Frontend bug so it correctly stays (the App deploy is blocked). DeployBlocker was not present and nothing is removed.
The category-scoped screen DYNAMIC_CATEGORY_REQUIRE_FIELDS_RULE_NEW and the initialCategoryName / isCategoryLocked props in AddRequireFieldsRulePage.tsx and RequireFieldsRulePageBase.tsx.
The "Create new rule" contextual section on CategorySettingsPage.tsx.
For require-fields rules, a category's "rule" is simply the category's own required-field flags — there is no separate per-rule entity. Validation for a new rule therefore diffs the form against the category's current state:
getRequireFieldsRuleValidationError returns the "select at least one field" error whenever !hasRequireFieldsRuleChanges(...) for a non-edit (create) flow — see RequireFieldsRulesUtils.ts#L524-L533.
hasRequireFieldsRuleChanges compares effectiveForm against getRequireFieldsFormFromCategory(category) (the category's current required flags) — see RequireFieldsRulesUtils.ts#L231-L255.
Sequence:
First create "Require for all fields": category has no requirements → effectiveForm (all REQUIRE) differs from category (DO_NOT_REQUIRE) → hasChanges = true → saves. saveRequireFieldsRule optimistically writes the required flags onto the category in Onyx.
Second create "Require for all fields" on the same locked category: the category now already requires all fields, so getRequireFieldsFormFromCategory(category) returns all REQUIRE. The user's selection (all REQUIRE) now equals the category state → hasRequireFieldsRuleChanges returns false → the error fires even though every field is visibly selected.
This is not the "nothing selected" case the message describes — it is a redundant no-op (the category already requires everything). The create flow lacks the graceful no-op handling that the edit flow already has: for editing, handleSave clears the draft and navigates back on no-change (RequireFieldsRulePageBase.tsx#L351-L355), whereas the create flow maps the same no-op to the misleading error via errorMessage/handleSubmit.
Suggested targeted fix
Differentiate the two states in getRequireFieldsRuleValidationError (or handleSave): only show confirmErrorDoNotRequireField when the effective form genuinely requires no field. When the form does require at least one field but produces no delta because the category already requires it, treat it as a redundant no-op — clear the draft and navigate back gracefully (mirroring the edit-flow no-op at RequireFieldsRulePageBase.tsx#L351-L355) rather than blocking with an error.
changed the title [-]Rules - "Please select at least one field" is shown when all fields are selected[/-][+][Due for payment 2026-08-17] Rules - "Please select at least one field" is shown when all fields are selected[/+]on Aug 10, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.51-1 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-08-17. 🎊
The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero 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]
Activity
applause-bot commentedon Jul 31, 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/dc404983336b54b77494cba2ab535a1ae1946149fe6ef4ea3d2a869f00975a84
melvin-bot commentedon Jul 31, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #96591
melvin-bot commentedon Jul 31, 2026
@JS00001 @situchan you have been assigned to this deploy blocker because you reviewed the offending PR: #96591
melvin-bot commentedon Jul 31, 2026
@Krishna2323 you have been assigned to this deploy blocker because you authored the offending PR: #96591
melvin-bot commentedon Jul 31, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Jul 31, 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 Jul 31, 2026
🔍 Investigation Summary
Classification: Frontend bug (fix is entirely in
Expensify/App)Causing PR: #96591 - "Add contextual Category rules section to category details RHP" by @Krishna2323 (Medium-High confidence)
Related Issues: #92742 (the feature issue this PR implemented)
Recommendation: ROLL FORWARD
The blocker is surfaced by a pre-existing validation quirk that #96591's new category-scoped "Create new rule" flow makes reachable. A targeted fix (differentiate "nothing selected" from "already required") is far narrower and safer than reverting the whole contextual-rules feature, and the revert would remove otherwise-working functionality. REVERT of #96591 is a viable fallback if a fix cannot land quickly.
Assigned: @Krishna2323 (PR author), @JS00001 and @situchan (approving reviewers) — already assigned by Melvin.
Labels: No changes. Only
DeployBlockerCashis present; this is a Frontend bug so it correctly stays (the App deploy is blocked).DeployBlockerwas not present and nothing is removed.📋 Detailed Analysis
Evidence
9.4.47-0; R4: Add contextual Category rules section to category details RHP #96591 merged2026-07-30, in the2026-07-31deploy checklist (Deploy Checklist: New Expensify 2026-07-31 #97529).StagingDeployCash.DYNAMIC_CATEGORY_REQUIRE_FIELDS_RULE_NEWand theinitialCategoryName/isCategoryLockedprops inAddRequireFieldsRulePage.tsxandRequireFieldsRulePageBase.tsx.CategorySettingsPage.tsx.src/libs/RequireFieldsRulesUtils.tsonly adds a comment and new exports — it does not modify the validation itself. The offending validation model pre-existed; R4: Add contextual Category rules section to category details RHP #96591 exposed it by enabling repeated rule creation against the same locked category.Verification
confirmErrorDoNotRequireField= "Please select at least one field." atsrc/languages/en.ts:7955.getRequireFieldsRuleValidationErroratsrc/libs/RequireFieldsRulesUtils.ts#L512-L536.src/pages/workspace/rules/RequireFieldsRules/RequireFieldsRulePageBase.tsx#L247(errorMessage), gated inhandleSubmit.AddRequireFieldsRulePage.tsx,RequireFieldsRulePageBase.tsx,CategorySettingsPage.tsx,CategoryContextualRulesUtils.ts— the exact repro surface.Root Cause
For require-fields rules, a category's "rule" is simply the category's own required-field flags — there is no separate per-rule entity. Validation for a new rule therefore diffs the form against the category's current state:
getRequireFieldsRuleValidationErrorreturns the "select at least one field" error whenever!hasRequireFieldsRuleChanges(...)for a non-edit (create) flow — seeRequireFieldsRulesUtils.ts#L524-L533.hasRequireFieldsRuleChangescompareseffectiveFormagainstgetRequireFieldsFormFromCategory(category)(the category's current required flags) — seeRequireFieldsRulesUtils.ts#L231-L255.Sequence:
effectiveForm(allREQUIRE) differs from category (DO_NOT_REQUIRE) →hasChanges = true→ saves.saveRequireFieldsRuleoptimistically writes the required flags onto the category in Onyx.getRequireFieldsFormFromCategory(category)returns allREQUIRE. The user's selection (allREQUIRE) now equals the category state →hasRequireFieldsRuleChangesreturnsfalse→ the error fires even though every field is visibly selected.This is not the "nothing selected" case the message describes — it is a redundant no-op (the category already requires everything). The create flow lacks the graceful no-op handling that the edit flow already has: for editing,
handleSaveclears the draft and navigates back on no-change (RequireFieldsRulePageBase.tsx#L351-L355), whereas the create flow maps the same no-op to the misleading error viaerrorMessage/handleSubmit.Suggested targeted fix
Differentiate the two states in
getRequireFieldsRuleValidationError(orhandleSave): only showconfirmErrorDoNotRequireFieldwhen the effective form genuinely requires no field. When the form does require at least one field but produces no delta because the category already requires it, treat it as a redundant no-op — clear the draft and navigate back gracefully (mirroring the edit-flow no-op atRequireFieldsRulePageBase.tsx#L351-L355) rather than blocking with an error.JS00001 commentedon Jul 31, 2026
This is behind a beta
4 remaining items
Krishna2323 commentedon Aug 3, 2026
PR is ready for review: #97729
cc: @situchan
[-]Rules - "Please select at least one field" is shown when all fields are selected[/-][+][Due for payment 2026-08-17] Rules - "Please select at least one field" is shown when all fields are selected[/+]melvin-bot commentedon Aug 10, 2026
@Krishna2323 / @situchan
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.51-1 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-08-17. 🎊
The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero 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]
JS00001 commentedon Aug 11, 2026
This will be paid separately, as a part of a project