Skip to content

[Due for payment 2026-07-13] Spend rule - System message does not show permitted currencies changes #94078

Closed

Description

@applause-bot

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: 9.4.16-1
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: #93063
Email or phone of affected tester (no customers): applausetester+khcategory19@applause.expensifail.com
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:

  • Enable Expensify card and Rules.
  • Workspace has at least one virtual Expensify card.
  • Create a spend rule in workspace settings > Rules.
  1. Go to staging.new.expensify.com
  2. Go to workspace settings > Rules.
  3. Open the spend rule.
  4. Click Permitted currencies.
  5. Deselect any currency and click Save.
  6. Click Save rule.
  7. Go to #admins.
  8. Look for the system message related to spend rule changes.

Expected Result:

System message will show the changes related to permitted currencies.

Actual Result:

System messages shows unrelated log "allowed amounts under $10 on 'kkk'".

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7185638_1781884571384.1.1.mp4

View all open jobs on GitHub

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

Activity

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

  3. melvin-bot commented on Jun 19, 2026

    @melvin-bot

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

  4. melvin-bot commented on Jun 19, 2026

    @melvin-bot

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

  5. github-actions commented on Jun 19, 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. MelvinBot commented on Jun 19, 2026

    @MelvinBot
    Contributor

    Issue Analysis

    Root Cause: The #admins system message that describes a spend-rule change is generated server-side from the rule's filter AST — not by the App. PR #93063 correctly adds a currency filter node to the AST and sends the full rule to the backend, but the backend's spend-rule message generator doesn't yet know how to describe the currency filter key. So when only the permitted currencies change, the regenerated description omits the currency part and falls back to describing the remaining amount/merchant filters (e.g. "allowed amounts under $10 on 'kkk'").

    This is a backend issue — the fix is outside the Expensify/App repo. The App side is working correctly; no App code change will fix the system-message wording. This needs an internal engineer with access to the backend (Auth / Web-Expensify) to teach the spend-rule change-message generator how to render the currency filter.

    Investigation details & evidence

    The App sends the complete, correct AST. When currencies are selected, SpendRulesUtils.buildSpendRuleAST builds a currency filter node (left: 'currency', operator EQUAL_TO/NOT_EQUAL_TO) and combines it into the rule, then setExpensifyCardRule serializes the whole AST and sends it via SET_EXPENSIFY_CARD_RULE. The currency syntax key resolves to 'currency' in CONST.SEARCH.SYNTAX_FILTER_KEYS.

    The App does not generate this system message. setExpensifyCardRule creates no optimistic report action / comment — it only writes the rule to PRIVATE_EXPENSIFY_CARD_SETTINGS. The #admins system message is produced by the backend when it processes the command, so its wording is entirely backend-controlled.

    Why the message reads "allowed amounts under $10 on 'kkk'": that string is the backend's description of the rule's other (amount + merchant) filters. The currency filter is present in the data but the generator has no branch to describe it, so it's silently dropped from the human-readable change message.

    Corroborating evidence: Expensify/App#92295 ("Spend rules - 'Spend category' appears for each spend category in the system message") is a sibling bug in the same server-side spend-rule message generator — confirming these messages are backend-generated and that the generator has had per-filter rendering gaps.

    Alternative considered: that the App fails to save the currency change. Ruled out — the bug report's symptom is the #admins log wording, the currencies menu reflects the selection correctly (currenciesMenuTitle), and the AST construction includes the node.

    Confidence: Medium-High. The App side is verified with file:line evidence; the backend root cause is inferred (the backend repo isn't checked out here), but it's the only component that produces the message and #92295 confirms the mechanism.

    Related issues

    • Expensify/App#92295 — same server-side spend-rule message generator, per-filter rendering bug.

    Next Steps: This requires a backend fix (spend-rule change-message generator must render the currency filter), so it can't be implemented from Expensify/App. An internal engineer should pick this up against the backend repo. Reply with @MelvinBot <feedback> to refine this analysis.

  7. 9 remaining items

  8. melvin-bot commented on Jun 22, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.16-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-06-29. 🎊

  9. melvin-bot commented on Jun 22, 2026

    @melvin-bot

    @luacmartins / @JS00001 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]. If no checklist is needed for this issue, you can click: [no checklist button]

  10. melvin-bot commented on Jun 23, 2026

    @melvin-bot

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

  11. changed the title [-][Due for payment 2026-06-29] Spend rule - System message does not show permitted currencies changes[/-] [+][Due for payment 2026-06-30] [Due for payment 2026-06-29] Spend rule - System message does not show permitted currencies changes[/+] on Jun 23, 2026
  12. melvin-bot commented on Jun 23, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.17-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-06-30. 🎊

  13. melvin-bot commented on Jun 23, 2026

    @melvin-bot

    @luacmartins / @JS00001 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]. If no checklist is needed for this issue, you can click: [no checklist button]

  14. changed the title [-][Due for payment 2026-06-30] [Due for payment 2026-06-29] Spend rule - System message does not show permitted currencies changes[/-] [+][Due for payment 2026-07-13] Spend rule - System message does not show permitted currencies changes[/+] on Jul 6, 2026
  15. melvin-bot commented on Jul 6, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.27-2 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-07-13. 🎊

  16. melvin-bot commented on Jul 6, 2026

    @melvin-bot

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