Skip to content

[Due for payment 2026-08-21] Rules - Unable to save Don't require for Description and Attendees #96814

Closed

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 9.4.43-0
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #95312
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.
  1. Go to staging.new.expensify.com
  2. Go to workspace settings > Rules > Field requirements.
  3. Click Create field requirement rule.
  4. Select a category.
  5. Select Don't require for Description, Receipt and Itemized receipt.
  6. Click Save rule.
  7. Open the created rule.

Expected Result:

Description will show Don't require as selected.

Actual Result:

Description does not show Don't require as selected.
User cannot save Don't require for Description.
The same issue also happens with Attendees field.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome Safari

Screenshots/Videos

Bug7215046_1784768881610.7.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Mita Rachim
Bug ID: 7215046

Issue OwnerCurrent Issue Owner: @Krishna2323

Activity

  1. added
    DeployBlockerCash
    on Jul 23, 2026
  2. applause-bot commented on Jul 23, 2026

    @applause-bot
    Author

    While Applause doesn't embed attachments for this bug, here are the links for quick view:
    https://platform.applause.com/services/links/v1/external/2cda3b608b06c9813522d9fbf5da4e858a81333602f7105f9cf5f6c09439805a

  3. added
    Bug
    on Jul 23, 2026
  4. melvin-bot commented on Jul 23, 2026

    @melvin-bot

    You have been assigned to this deploy blocker because you recently merged this PR: #95312

  5. melvin-bot commented on Jul 23, 2026

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  6. github-actions commented on Jul 23, 2026

    @github-actions
    Contributor

    👋 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:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  7. changed the title [-]Rules - Unable to save Don't require for Description[/-] [+]Rules - Rules - Unable to save Don't require for Description and Attendees[/+] on Jul 23, 2026
  8. changed the title [-]Rules - Rules - Unable to save Don't require for Description and Attendees[/-] [+]Rules - Unable to save Don't require for Description and Attendees[/+] on Jul 23, 2026
  9. MelvinBot commented on Jul 23, 2026

    @MelvinBot
    Contributor

    Proposal

    Root Cause: Don't require for Description (and Attendees) has no persistent backend representation, unlike receipts. This deploy blocker was introduced by the "add waive path" work in #95312.

    The new toggle offers a Don't require state for every field, but only the receipt fields got a real waive value (maxAmountNoReceipt / maxAmountNoItemizedReceipt = DISABLED_MAX_EXPENSE_VALUE). Description/Attendees only have a boolean areCommentsRequired / areAttendeesRequired, so Don't require for them is just "not required" — the default state, with nothing to save. This produces the two reported symptoms:

    1. Nothing persists — in saveRequireFieldsRule, Description is only written when it differs from the category's initial value. Don't require equals the default Don't require, so the !== check is false and no write happens (RequireFieldsRulesUtils.ts:366).
    2. Reopen shows blank — in edit mode the displayed setting comes from getActiveFieldRequirementsDirection, which returns undefined for a non-required Description (RequireFieldsRulesUtils.ts:802). undefined renders neither toggle button as selected, even though Receipt/Itemized (which have a waive override) correctly show Don't require.

    So the rule does get created (the receipt waive persists), but the Description toggle comes back unselected — looking broken and inconsistent next to the receipt rows.

    What changes do you think we should make in order to solve the problem?

    Make the edit-mode display consistent for fields that can't be waived: when editing an existing rule, Description and Attendees should show Don't require selected when they aren't required, instead of leaving the toggle blank.

    The narrowest place is the edit branch of getRequireFieldsDisplayedSetting (RequireFieldsRulesUtils.ts:864): for DESCRIPTION_SETTING/ATTENDEES_SETTING, fall back to DO_NOT_REQUIRE when getActiveFieldRequirementsDirection is undefined, so a saved rule reopens with the toggle reflecting the effective (not-required) state. getActiveFieldRequirementsDirection itself should be left returning undefined since the clearedFields/coupling logic depends on that.

    The save path needs no change — areCommentsRequired = false is already the correct persisted state; only the display was wrong.

    Investigation details & alternatives considered
    • Reproduction is NEW-rule + receipt waive: Don't require for Description alone is intentionally blocked by validation (confirmErrorDoNotRequireField, RequireFieldsRulesUtils.ts:531) because it wouldn't persist anything. The rule only saves here because the receipt waive is a real change — which is exactly why the mismatch surfaces on reopen.
    • Toggle rendering: FieldRequirementsDirectionToggle.tsx:19 highlights a button only when direction strictly equals REQUIRE or DO_NOT_REQUIRE; undefined → neither highlighted.
    • Alternative 1 — don't offer Don't require for Description/Attendees at all. Rejected: the two-state toggle is core to the field-requirements UX and removing it would be a larger design change.
    • Alternative 2 — revert R3: Rename Require fields to Field requirements and add waive path #95312. Possible since it's the culprit, but that PR also does the "Require fields → Field requirements" rename across many files; the targeted display fix above is far less disruptive than a full revert.
    • Confidence is code-level (reproducible in staging, not production — consistent with a regression from R3: Rename Require fields to Field requirements and add waive path #95312). No production logs needed; this is deterministic UI logic.

    Possibly related (not a duplicate): #94979 — category UX issues with receipt vs itemized receipt thresholds, same feature area but a distinct problem.


    Next Steps for Contributor+ team:
    To accept: @MelvinBot implement [this](https://github.com/Expensify/App/issues/96814) to create a draft PR.
    To refine: @MelvinBot <your feedback>
    To reject: Explain why you are rejecting Melvin's proposal.

  10. situchan commented on Jul 23, 2026

    @situchan
    Contributor

    This was reported here.
    We agreed to fix "Don't require" bugs as follow-up.

  11. removed
    DeployBlockerCash
    on Jul 23, 2026
  12. 14 remaining items

  13. added
    Weekly
    and removed
    Daily
    on Aug 3, 2026
  14. Krishna2323 commented on Aug 3, 2026

    @Krishna2323
    Contributor

    PR is ready for review: #97726

    cc: @situchan

  15. melvin-bot commented on Aug 14, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    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.

  16. jponikarchuk commented on Aug 14, 2026

    @jponikarchuk

    Deploy Blocker #98640 was identified to be related to the PR #97726 that attempted to fix this issue.

  17. added
    Daily
    and removed
    Reviewing
    Weekly
    on Aug 14, 2026
  18. changed the title [-]Rules - Unable to save Don't require for Description and Attendees[/-] [+][Due for payment 2026-08-21] Rules - Unable to save Don't require for Description and Attendees[/+] on Aug 14, 2026
  19. melvin-bot commented on Aug 14, 2026

    @melvin-bot

    @Krishna2323 / @situchan

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.53-10 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-21. 🎊

    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]

  20. Krishna2323 commented on Aug 17, 2026

    @Krishna2323
    Contributor

    @JS00001 this can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugDailyEngineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions