Skip to content

[Due for payment 2026-02-23] Expense - System message doesn't show updated description when edit merchant rule #82245

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-7
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+swe@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. Login new gmail account
  3. Create a new workspace
  4. Enable rules
  5. Create a merchant rule for merchant Trick ( contains)
    Update to
    Merchant Even
    Category Advertising
    Description > Iou

9
&
||
Reimbursable yes
6. Go to workspace chat
7. Create an expense with merchant Trick
8. Submit the expense
9. Go to merchant rule
10. Edit the rule
In description add @gh@gmail.com so description should be

Iou
@gh@gmail.com
9
&
||
and save

  1. Go to workspace chat
  2. Create a expense with merchant with Trick
  3. Open the expense
  4. Note the system message

Expected Result:

System message must show updated description like in expense details.

Actual Result:

System message doesn't show updated description but expense details reflects the updated description.

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: @trjExpensify

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

    @luacmartins recently merged #81033, but they are OOO right now, so I'll auto-assign someone else.

  3. melvin-bot commented on Feb 12, 2026

    @melvin-bot

    Triggered auto assignment to @trjExpensify (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.

  4. melvin-bot commented on Feb 12, 2026

    @melvin-bot

    Triggered auto assignment to @mollfpr (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

  5. melvin-bot commented on Feb 12, 2026

    @melvin-bot

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

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

    @OSBotify
    Contributor

    Investigation Summary

    Classification: Frontend bug (by definition - enabling the feature exposed this behavior)
    Causing PR: #81033 - "Enable merchant rules" by @luacmartins (High confidence)
    Related Feature PRs:

    • #79659 - Expense rules phase 2 (original implementation)
    • #81220 - Add markdown to rule description

    Recommendation: DEMOTE

    This is actually expected behavior, not a bug. System messages are historical records that capture what happened at a specific point in time. When a merchant rule modifies an expense, the system message shows the description from that rule at that moment. If the rule is later edited, the system message correctly continues to show what the rule was when it modified the expense - it is not supposed to retroactively update.

    The expense details DO correctly show the current/updated description, which is the expected behavior. The system message is working as designed by showing a historical audit trail.

    Reasoning for DEMOTE:

    • This is not a code bug - the system is working as architecturally designed
    • System messages throughout the app are immutable historical records (e.g., "changed the amount to $X" doesn't update if you change the amount again)
    • The actual expense data (description field) correctly reflects the current state
    • This is a UX/product question about whether system messages should be retroactively updated, not a technical malfunction
    • The feature is new and doesn't exist in production yet, so there's no regression
    • No users are currently affected since merchant rules were just enabled in staging

    Labels: This should not block the deploy. I recommend removing the DeployBlockerCash label. If Expensify wants different behavior (system messages that update dynamically), that would be a feature enhancement request, not a deploy blocker.

    Detailed Analysis

    Evidence

    PR #81033 removed the production gate (if (isProduction) return null;) that was hiding merchant rules. This exposed the merchant rules feature to production users for the first time. The behavior reported in this issue has existed since the original implementation in PR #79659 (Jan 22).

    How System Messages Work

    When a merchant rule modifies an expense, it creates a MODIFIED_EXPENSE report action with policyRulesModifiedFields in the originalMessage. The system message is generated by /home/runner/_work/App/App/src/libs/ModifiedExpenseMessage.ts (lines 471-481 and 716-724), which reads the policyRulesModifiedFields data and creates text like:

    set the category to "Travel", merchant to "McDonald's", marked the expense as "billable", 
    and marked the expense as "reimbursable" via workspace rules
    

    This message is created ONCE when the rule fires and is stored immutably in the report action. It does not dynamically update based on current rule state.

    Verification

    • The ModifiedExpenseMessage.ts file shows system messages are generated from the originalMessage field of report actions
    • Report actions are immutable historical records
    • The expense transaction data itself (separate from system messages) does correctly reflect any updates
    • This architectural pattern is consistent with how all system messages work (amount changes, merchant changes, etc.)

    Root Cause

    This is by design. System messages provide an audit trail of what happened. If a rule said "set description to X" when it fired, the message should continue showing that even if the rule is later changed to say "set description to Y". The alternative (retroactively updating historical messages) would be confusing and could hide important audit information.

  8. 5 remaining items

  9. JS00001 commented on Feb 12, 2026

    @JS00001
    Contributor

    We cp'd a fix to disable this on prod, so this is NAB

  10. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Feb 12, 2026
  11. changed the title [-]Expense - System message doesn't show updated description when edit merchant rule[/-] [+][Due for payment 2026-02-23] Expense - System message doesn't show updated description when edit merchant rule[/+] on Feb 16, 2026
  12. melvin-bot commented on Feb 16, 2026

    @melvin-bot

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

  13. melvin-bot commented on Feb 16, 2026

    @melvin-bot

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

  14. melvin-bot commented on Feb 16, 2026

    @melvin-bot

    @luacmartins / @mollfpr / @JS00001 @trjExpensify 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]

  15. JS00001 commented on Feb 17, 2026

    @JS00001
    Contributor

    Fixed by #82325

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