Skip to content

[Due for payment 2026-10-28] Rules - Itemized receipt can be set to Require when Receipt is not required via command #103928

Closed

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.


Version Number: 9.5.8-3
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: #99624
Email or phone of affected tester (no customers): [email protected]
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:

  • Create a Control workspace.
  • Enable Rules.
  • Enable describeRule beta.
  1. Go to staging.new.expensify.com
  2. Go to workspace settings > Rules.
  3. Click Add rule > Set field requirements.
  4. Click Describe.
  5. Enter Do not require receipt and do require itemized receipt when Category is Advertising.
  6. Click Next.
    → Receipt is set to Don't require. Itemized receipt is set to Require.
  7. Click Save rule.
  8. Go to Field requirements.
    → Both Receipt and Itemized receipt are set to Require.

Expected Result:

In Step 6, both Receipt and Itemized receipt should be set to Don't require or Require because we cannot set requirement for Itemized receipt when Receipt is not required.

Actual Result:

In Step 6, Receipt is set to Don't require. Itemized receipt is set to Require.
In Step 8, after saving rule, both Receipt and Itemized receipt are set to Require.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7285533_1791910521816.16.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Svetlana Lazutkina
Bug ID: 7285533

Issue OwnerCurrent Issue Owner: @Krishna2323

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Oct 13, 2026
  2. applause-bot commented on Oct 13, 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/42c4bcd383dfef5e0e76db76b70131fdfdf78762a4efa6a4ce8d483d6249a1fe

  3. melvin-bot commented on Oct 13, 2026

    @melvin-bot

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

  4. melvin-bot commented on Oct 13, 2026

    @melvin-bot

    @luacmartins @JS00001 @Krishna2323 you have been assigned to this deploy blocker because you reviewed the offending PR: #99624

  5. melvin-bot commented on Oct 13, 2026

    @melvin-bot

    @rushatgabhane you have been assigned to this deploy blocker because you authored the offending PR: #99624

  6. melvin-bot commented on Oct 13, 2026

    @melvin-bot

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

  7. github-actions commented on Oct 13, 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.
  8. JS00001 commented on Oct 13, 2026

    @JS00001
    Contributor

    this has been moved behind a beta

  9. MelvinBot commented on Oct 13, 2026

    @MelvinBot
    Contributor

    Deploy Blocker Analysis

    Causing PR: AI-assisted rule creation (high confidence).

    Recommendation: Not a deploy blocker anymore. Don't revert. [cp staging] Hide Describe rule button behind a client side beta already hides the Describe flow behind the describeRule beta. Fix the bug forward as a normal follow-up before the beta widens.

    Root cause: The Describe result writes Concierge's receipt and itemized-receipt values straight into the draft. It skips the receipt dependency rules that manual toggles use. Save then forces Receipt back to Require.

    Investigation details

    Step 6 (introduced by the PR): RequireFieldsRulePageBase.tsx:434-438 applyGeneratedRule calls setDraftRequireFieldsRule(values) directly. Manual toggles go through getRequireFieldsFieldSettingUpdate (RequireFieldsRulesUtils.ts:767-790). That function keeps Itemized = Require from pairing with Receipt = Don't require. Validation (RequireFieldsRulesUtils.ts:516-540) doesn't catch the conflict either.

    Step 8 (existing save logic): RequireFieldsRulesUtils.ts:327-335 sets receiptTarget = 0 (Require) when Itemized is Require. So the saved rule shows both as Require. This code predates the PR. It was only reachable with the conflicting pair through the new Describe path.

    Beta gate: DescribeRuleButton.tsx:45-47 returns null unless CONST.BETAS.DESCRIBE_RULE is on. The repro lists the beta as a precondition.

    Suggested fix:

    1. In applyGeneratedRule, run the generated receipt and itemized values through the same logic as getRequireFieldsFieldSettingUpdate before writing the draft.
    2. As a backstop, make getRequireFieldsRuleValidationError reject Itemized = Require with Receipt = Don't require, so save can't silently change Receipt.

    view run

  10. added
    ReviewingHas a PR in review
    and removed
    ReviewingHas a PR in review
    on Oct 15, 2026
  11. changed the title [-]Rules - Itemized receipt can be set to Require when Receipt is not required via command[/-] [+][Due for payment 2026-10-28] Rules - Itemized receipt can be set to Require when Receipt is not required via command[/+] on Oct 21, 2026
  12. melvin-bot commented on Oct 21, 2026

    @melvin-bot

    @Krishna2323

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

    The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ 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]

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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2Engineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions