Skip to content

[$250] Expense - Expense rules apply sequentially with partial match #81219

Closed

Description

@lanitochka17

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.11-17
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: #80915
Email or phone of affected tester (no customers): dreamnitethedragon+yydyd373@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Redminote 10S Android 13
App Component: Money Requests

Action Performed:

1.Launch app
2. Create a workspace
3. Tap account - expense rule
4. Create a rule [merchant A - update merchant to Beep]
5. Create a expense with merchant Shahrukh
6. Note merchant updated to Beep doing partial match
7. Go to expense rule and create second rule
[ If merchant Beep - update merchant to Zen]
8. Create a expense with merchant A
9. Note merchant updated to Zen [as sequence chain 2 rules applied]

Expected Result:

When creating expense with Merchant A , it must be updated to Beep.

Actual Result:

When creating expense with Merchant Shahrukh , it is updated to Beep doing partial match.

When creating expense with Merchant A , it is updated to Zen (Expense rule applied sequentially).

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7064637_1770064465814.Screenrecorder-2026-02-03-00-23-40-979.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022018425202743708549
  • Upwork Job ID: 2018425202743708549
  • Last Price Increase: 2026-02-02
  • Automatic offers:
    • situchan | Contributor | 110329855

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    ExternalAdded to denote the issue can be worked on by a contributor
    on Feb 2, 2026
  2. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Feb 2, 2026
  3. melvin-bot commented on Feb 2, 2026

    @melvin-bot

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

  4. changed the title [-]Expense - Expense rules apply sequentially with partial match[/-] [+][$250] Expense - Expense rules apply sequentially with partial match[/+] on Feb 2, 2026
  5. melvin-bot commented on Feb 2, 2026

    @melvin-bot

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

  6. melvin-bot commented on Feb 2, 2026

    @melvin-bot
  7. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Feb 2, 2026
  8. melvin-bot commented on Feb 2, 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.

  9. melvin-bot commented on Feb 2, 2026

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @bernhardoj (External)

  10. marufsharifi commented on Feb 2, 2026

    @marufsharifi

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    Expense - Expense rules apply sequentially with partial match

    What is the root cause of that problem?

    In RulePageBase.tsx, new rules are appended to the list, so the newest rule runs last. Rule evaluation follows list order, which allows earlier rules to mutate the merchant and trigger later rules.

    newRules = [...expenseRules, newRule];

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

    Prepend new rules so the newest rule takes precedence and stops unintended chaining.

    - newRules = [...expenseRules, newRule];
    + newRules = [newRule, ...expenseRules];

    What alternative solutions did you explore? (Optional)

  11. bernhardoj commented on Feb 3, 2026

    @bernhardoj
    Contributor

    I think this will be handled by @situchan

  12. removed
    Help WantedApply this label when an issue is open to proposals by contributors
    on Feb 3, 2026
  13. melvin-bot commented on Feb 3, 2026

    @melvin-bot

    📣 @situchan 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

    Offer link
    Upwork job
    Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
    Keep in mind: Code of Conduct | Contributing 📖

  14. JS00001 commented on Feb 3, 2026

    @JS00001
    Contributor

    This is the behavior on classic, not a blocker, may be intentional. I pinged Jason to check

  15. removed
    DeployBlockerCashThis issue or pull request should block deployment
    on Feb 3, 2026
  16. JS00001 commented on Feb 4, 2026

    @JS00001
    Contributor

    Closing, we dont plan on fixing

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.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions