Skip to content

[Due for payment 2026-11-11] Rule - Created rule doesn´t disappear after deleting category used as condition. #105855

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.31-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: #104155
Email or phone of affected tester (no customers): ibellicotest+3215@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Motorola MotoG60 / Android 12 (Hybrid app) - Windows 11 / Chrome
App Component: Workspace Settings

Action Performed:

Prerequisite: User is owner of a "Control" workspace.
Prerequisite 2: "Rules" and "Categories" enabled.

  1. Open the staging.new.expensify.com website.
  2. Navigate to "Workspaces" > Workspace > "Rules"
  3. Click on "Add Rule" > "Apply expense defaults"
  4. In "If any expense matches", select any category.
  5. In "Then apply the following defaults", apply any default.
  6. Save the created rule.
  7. Navigate to "Categories"
  8. Select the category used as condition in rule and delete it.
  9. Return to "Rules" > "Expense Defaults"
  10. Note that created rule is still displayed in rules list.

Expected Result:

Created rule should disappear from expense defaults after deleting the category or tag used as condition during creation.

Actual Result:

Created rule is still visible in expense defaults after deleting the category or tag used as condition during creation.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7304307_1793759153001.De7.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Alberto Gutierrez
Bug ID: 7304307

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 Nov 4, 2026
  2. applause-bot commented on Nov 4, 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/7f6b22af5736dd5fafb546bb5c68c6021cfe80420c93efd576a905bce0ce5aa3

  3. melvin-bot commented on Nov 4, 2026

    @melvin-bot

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

  4. melvin-bot commented on Nov 4, 2026

    @melvin-bot

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

  5. melvin-bot commented on Nov 4, 2026

    @melvin-bot

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

  6. melvin-bot commented on Nov 4, 2026

    @melvin-bot

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

  7. github-actions commented on Nov 4, 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. MelvinBot commented on Nov 4, 2026

    @MelvinBot
    Contributor

    🤖 Web test steps verification results: ❌ fail

    Reproduced on dev NewDot web: the expense-default rule remains after deleting its condition category.

    Expense defaults rule remains after deleting its Advertising condition category.

    Step Status
    1. Open websiteSigned-in web session displayed Home.
    ✅
    2. Navigate Workspaces > workspace > RulesOpened Rules in an owned Control workspace.
    ✅
    3. Add Rule > Apply expense defaultsExpense-default editor opened.
    ✅
    4. Select a condition categorySelected Advertising.
    ✅
    5. Select an expense defaultSelected Reimbursable: Yes.
    ✅
    6. Save ruleSaved rule appeared in the list.
    ✅
    7. Navigate CategoriesAdvertising appeared in the category list.
    ✅
    8. Delete the condition categoryConfirmed deletion; Advertising disappeared from Categories.
    ✅
    9. Return Rules > Expense defaultsOpened Expense defaults explicitly.
    ✅
    10. Rule disappears after deleting its condition categoryFailed: Category is “Advertising”; Mark as “reimbursable” remained visible.

    Cause — high confidence: Support expense defaults for more than just merchants introduced category-conditioned generic rules. The list filters deleted rules, not deleted condition categories (MerchantTypeRulesUtils.ts:180–210). This is intentional retention, not proven backend cleanup failure: the PR explicitly tests that rules remain after category deletion (CategoryContextualRulesUtilsTest.ts:188–203).

    Recommendation: Keep the deploy blocker. Confirm whether deleting a condition should hide or permanently delete its rule. If QA’s expectation stands and no verified fix is ready, revert the introducing PR after checking compatibility with newly created rules. A visibility fix must preserve rules with other valid category conditions. Tag deletion and server-side behavior were not runtime-tested.
    Expense defaults rule remains after deleting its Advertising condition category.
    ❌

    view run · view recording

  9. JS00001 commented on Nov 4, 2026

    @JS00001
    Contributor

    this is expected

  10. m-natarajan commented on Nov 4, 2026

    @m-natarajan

    MacBook Air 26.6.2 Chrome, build 9.5.31-3. Category field is not shown in Expense defaults, the feature was reverted.

    No.amount.field.1.mp4
  11. added and removed
    ReviewingHas a PR in review
    on Nov 4, 2026
  12. changed the title [-]Rule - Created rule doesn´t disappear after deleting category used as condition.[/-] [+][Due for payment 2026-11-11] Rule - Created rule doesn´t disappear after deleting category used as condition.[/+] on Nov 4, 2026
  13. melvin-bot commented on Nov 4, 2026

    @melvin-bot

    @Krishna2323 / @situchan

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.31-4 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-11-11. 🎊

    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]

  14. added
    ReviewingHas a PR in review
    and removed on Nov 5, 2026
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.EngineeringReviewingHas a PR in reviewWeeklyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions