Skip to content

Expense-Using merchant rule url is not shown as link in expense details #81145

Closed

Description

@mitarachim

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?: Yes
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@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Redminote 10S Android 13
App Component: Workspace Settings

Action Performed:

  1. Launch app
  2. Create a workspace
  3. Open Account - Expense Rules
  4. Enter a merchant
  5. Enter a merchant and description as # google.com and save
  6. Open workspace chat
  7. Create a expense with merchant used in step 4
  8. Open the expense and note description is not shown as link
  9. Create a report
  10. Add an expense with same description used in step 5 # google.com
  11. Open the expense and note description shown as link

Expected Result:

Using merchant rule url must be shown as link in expense details.

Actual Result:

Using merchant rule url is not shown as link in expense details.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7063406_1769930273577.Screenrecorder-2026-02-01-12-41-08-942.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @luacmartins

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    and removed on Feb 2, 2026
  2. melvin-bot commented on Feb 2, 2026

    @melvin-bot

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

  3. melvin-bot commented on Feb 2, 2026

    @melvin-bot

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

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

    @OSBotify
    Contributor

    Investigation Summary

    Classification: Frontend bug (but NOT caused by PR #80915)
    Causing PR: No specific PR identified - this appears to be a pre-existing bug
    Confidence: High

    Recommendation: NEEDS INVESTIGATION

    This issue was discovered during regression testing of PR #80915, but that PR only added an "Expense Rules" menu item to the settings page and did not modify any code related to expense description rendering.

    Root Cause Analysis

    The bug appears to be a pre-existing issue where URLs in descriptions set by expense rules are not automatically converted to links in the expense details view.

    Technical Details:

    • In MoneyRequestView.tsx (line 880), the description field uses shouldRenderAsHTML={true}
    • When shouldRenderAsHTML is true, the component treats the title as raw HTML content
    • However, plain text URLs (like "google.com" or "#google.com") stored in transaction descriptions are not being linkified
    • This is different from manually entered descriptions which appear to work correctly

    Key Evidence:

    1. PR show Expense Rules tab in Account settings #80915 only modified src/pages/settings/InitialSettingsPage.tsx to add a menu item
    2. No changes were made to description rendering, Parser logic, or transaction handling
    3. The issue reproduces on both staging AND production (per the issue description)
    4. This suggests the bug existed before this deploy cycle

    Next Steps

    The fix likely requires one of the following approaches:

    1. Modify the description rendering logic to parse and linkify plain text URLs even when shouldRenderAsHTML is true
    2. Investigate how expense rules store descriptions and ensure URLs are properly formatted/linkified when applied
    3. Consider using shouldParseTitle instead of (or in addition to) shouldRenderAsHTML for the description field

    Tagging: @situchan (PR #80915 author) - This bug was discovered during regression testing of your PR, but it is not caused by your changes. The issue appears to be pre-existing.

    Labels: No label changes made - keeping both DeployBlockerCash labels since this is a legitimate bug that needs to be addressed, even though it's not a new regression.

  6. luacmartins commented on Feb 2, 2026

    @luacmartins
    Contributor

    Looking into this

  7. luacmartins commented on Feb 2, 2026

    @luacmartins
    Contributor

    This happens because when we create an expense manually, we store the description as markdown, i.e. comment: {comment: "<h1><a href=\"https://google.com\" target=\"_blank\" rel=\"noreferrer noopener\">google.com</a></h1>"}. But when the rule updates the description, it just updates it as text, i.e. comment: {comment: '# google.com'}.

  8. added a commit that references this issue on Feb 2, 2026
    e32e7b3
  9. luacmartins commented on Feb 2, 2026

    @luacmartins
    Contributor

    I'm working on this

  10. luacmartins commented on Feb 2, 2026

    @luacmartins
    Contributor

    PR in review

  11. luacmartins commented on Feb 3, 2026

    @luacmartins
    Contributor

    PR merged. We can close this one.

  12. melvin-bot commented on Feb 12, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions