Skip to content

[Due for payment 2026-03-02] Expense - "Only the oldest matching rule will apply" is not shown in save rule dialog box. #82239

Closed

Description

@jponikarchuk

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: V9.3.17-6
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: #81033
Email or phone of affected tester (no customers): dreamnitethedragon@gmail.com
Issue reported by: Applause Internal Team
Bug source: Pull Request QA execution
Device used: Redminote 10S Android 13
App Component: Money Requests

Action Performed:

  1. Launch app
  2. Login as new gmail account
  3. Create a workspace
  4. Enable rules and create a merchant rule
    Merchant Uber (contains)
    Update category to any
  5. Go to workspace chat
  6. Create an expense with merchant Uber
  7. Navigate back to merchant rules
  8. Add another merchant rule with same merchant
    Merchant Uber (contains)
    Update category to any
  9. Tap save rule

Expected Result:

"Only the oldest matching rule will apply" must be shown in save rule dialog box.

Actual Result:

"Only the oldest matching rule will apply" is not shown in save rule dialog box.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

1.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @JmillsExpensify

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Feb 12, 2026
  2. melvin-bot commented on Feb 12, 2026

    @melvin-bot

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

  3. melvin-bot commented on Feb 12, 2026

    @melvin-bot

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

  4. melvin-bot commented on Feb 12, 2026

    @melvin-bot

    Triggered auto assignment to @sonialiap (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  5. github-actions commented on Feb 12, 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.
  6. OSBotify commented on Feb 12, 2026

    @OSBotify
    Contributor

    🔍 Investigation Summary

    Classification: Frontend bug
    Causing PR: Not applicable - This is a missing feature, not a regression from PR #81033
    Related PRs: #80545 (original merchant rules implementation), #81033 (enabled merchant rules for all users)

    Recommendation: ROLL FORWARD

    This is not a regression introduced by PR #81033. The duplicate merchant rule warning dialog works correctly, but the prompt text is missing important information. The current text says:

    "Do you want to save a new rule for "{merchantName}" even though you already have an existing one?"

    But according to the test plan and help documentation, it should also mention: "Only the oldest matching rule will apply."

    This is a simple text update to the translations file. Rolling forward with a text fix is much simpler than reverting PR #81033.

    Labels: Removing DeployBlockerCash because:

    1. This is not reproducible in production (new feature that does not exist in prod)
    2. The duplicate check functionality works correctly - only the informational text is incomplete
    3. This does not block the App deploy since it is a minor UX polish issue, not a broken feature
    📋 Detailed Analysis

    Evidence

    The duplicate rule check is implemented and working in /home/runner/_work/App/App/src/pages/workspace/rules/MerchantRules/MerchantRulePageBase.tsx (lines 165-189, 214-228). When a duplicate is detected, it shows a confirmation modal using showConfirmModal with:

    • Title: workspace.rules.merchantRules.duplicateRuleTitle
    • Prompt: workspace.rules.merchantRules.duplicateRulePrompt

    Verification

    I verified the translation in /home/runner/_work/App/App/src/languages/en.ts line 6374:

    duplicateRulePrompt: (merchantName: string) => `Do you want to save a new rule for "${merchantName}" even though you already have an existing one?`,

    The help documentation at /home/runner/_work/App/App/docs/articles/new-expensify/workspaces/Workspace-Merchant-Rules.md line 46 states:

    If multiple Workspace Merchant Rules match the same expense, only the earliest-created rule applies.

    Root Cause

    The duplicate warning dialog was implemented in PR #80545 but the prompt text never included the clarification about rule precedence. PR #81033 simply enabled the feature for all users by removing the production gate - it did not introduce or cause this issue.

    Fix Required

    Update duplicateRulePrompt in all language files to include information about rule precedence. Example:

    duplicateRulePrompt: (merchantName: string) => `Do you want to save a new rule for "${merchantName}" even though you already have an existing one? Only the oldest matching rule will apply.`,
  7. 20 remaining items

  8. JmillsExpensify commented on Feb 21, 2026

    @JmillsExpensify
    Contributor

    Works for me as well.

  9. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Feb 23, 2026
  10. changed the title [-]Expense - "Only the oldest matching rule will apply" is not shown in save rule dialog box.[/-] [+][Due for payment 2026-03-02] Expense - "Only the oldest matching rule will apply" is not shown in save rule dialog box.[/+] on Feb 23, 2026
  11. melvin-bot commented on Feb 23, 2026

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  12. melvin-bot commented on Feb 23, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.24-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-03-02. 🎊

  13. melvin-bot commented on Feb 23, 2026

    @melvin-bot

    @luacmartins @JmillsExpensify The PR fixing this issue has been merged! 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]

  14. JmillsExpensify commented on Feb 24, 2026

    @JmillsExpensify
    Contributor

    @situchan you're being paid in one lump payment for this project, right?

  15. situchan commented on Feb 24, 2026

    @situchan
    Contributor

    right. 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

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.EngineeringWeeklyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions