Skip to content

[Due for payment 2026-07-21] [$250] Spend - Saved search name shows purchase-amount instead of original-amount #95302

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.27-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: #88002
Email or phone of affected tester (no customers): sidbhisdhidhisdhis@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.5 / Chrome
App Component: Search

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to Spend > Expenses.
  3. Click Display > Edit columns.
  4. Select "Purchase amount" > Save.
  5. Click Save > Save view.
  6. Click 3-dot menu on the saved search.

Expected Result:

Saved search name will show purchase-amount instead of original-amount.

Actual Result:

Saved search name shows original-amount instead of purchase-amount.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Image

View all open jobs on GitHub

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

Issue OwnerCurrent Issue Owner: @mallenexpensify
Upwork Automation - Do Not Edit

Activity

  1. applause-bot commented on Jul 3, 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/766c484f6a5d5b1dd2f93bf4199df3e39622c1a628304f55739e379612cd661e

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

    @melvin-bot

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

  4. melvin-bot commented on Jul 3, 2026

    @melvin-bot

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

  5. github-actions commented on Jul 3, 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 Jul 3, 2026

    @MelvinBot
    Contributor

    Proposal

    ⚠️ Heads up: the report's Expected and Actual results are worded identically ("shows purchase-amount instead of original-amount"), so the template is filled in incorrectly. Based on the code, the real discrepancy is the reverse of the title: the column you pick is now labeled "Purchase amount", but the auto-generated saved-search name still shows original-amount. Analysis below is written to that interpretation (medium confidence).

    What is the root cause of that problem?

    PR #88002 renamed only the display label of the amount column from "Original amount" to "Purchase amount" — it changed the translationKey in SearchTableHeader.tsx (common.originalAmount → common.purchaseAmount) and the iou.original → iou.purchase key.

    It did not rename the column's underlying identifier. The column's user-friendly query value is still original-amount at CONST/index.ts:7032.

    The saved-search name (for a search with no custom name) is generated from the query string, not the label — useSavedSearchTitles.ts → buildUserReadableQueryString, which appends columns:${getUserFriendlyValue(column)} at SearchQueryUtils.ts:1862-1864. So the name resolves to …columns:original-amount, mismatching the "Purchase amount" label the user just selected.

    Note there is already a separate filter key named purchase-amount at CONST/index.ts:7006, so the codebase is now inconsistent: the filter is "purchase" while the column is still "original".

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

    Make the column's query identifier match its new label. Rename the user-friendly value for the amount column from original-amount to purchase-amount at CONST/index.ts:7032 so the generated name reads columns:purchase-amount.

    Implementer must confirm the value round-trips through the query parser/autocomplete (the reverse lookup that maps the typed string back to CONST.SEARCH.TABLE_COLUMNS.ORIGINAL_AMOUNT). Because this column is a new feature not yet in production (per the report), there are no existing prod saved searches storing original-amount, so migration risk is low — but consider accepting original-amount as a backward-compatible alias for any staging saved searches already created.

    Alternative & verification notes
    • Alternative (do nothing): if original-amount is intentionally the stable internal query identifier and only the human label should change, then the current behavior is expected and this is not a deploy blocker. That would need a product decision.
    • Confirmed common.purchaseAmount: 'Purchase amount' exists at src/languages/en.ts:513, so the column header label renders correctly — only the auto-generated saved-search name is stale.
    • Confidence is medium because the bug direction is inferred from a mis-filled Expected/Actual template; the mechanism itself (label renamed, query value not) is confirmed in code.

    What alternative solutions did you explore? (Optional)

    See the collapsed notes above.


    Next Steps for Contributor+ team:
    To accept: @MelvinBot implement [this](https://github.com/Expensify/App/issues/95302) to create a draft PR.
    To refine: @MelvinBot <your feedback>
    To reject: Explain why you are rejecting Melvin's proposal.

  7. trjExpensify commented on Jul 3, 2026

    @trjExpensify
    Contributor

    @lanitochka17 - can we get a screenshot, and also the OP has identical expected and actual results. 😕 CC: @thesahindia

  8. lanitochka17 commented on Jul 3, 2026

    @lanitochka17

    @trjExpensify updated
    sorry for confusion

  9. trjExpensify commented on Jul 3, 2026

    @trjExpensify
    Contributor

    Thanks! @thesahindia can you work on this?

  10. thesahindia commented on Jul 4, 2026

    @thesahindia
    Member

    @trjExpensify, I will look into it today. We can remove the DeployBlockerCash label as it's a minor issue.

  11. 27 remaining items

  12. melvin-bot commented on Jul 14, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.33-8 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-21. 🎊

    For reference, here are some details about the assignees on this issue:

    • @thesahindia requires payment through NewDot Manual Requests
  13. melvin-bot commented on Jul 14, 2026

    @melvin-bot

    @thesahindia 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. melvin-bot commented on Jul 17, 2026

    @melvin-bot

    @thesahindia Whoops! This issue is 2 days overdue. Let's get this updated quick!

  15. melvin-bot commented on Jul 20, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  16. melvin-bot commented on Jul 20, 2026

    @melvin-bot

    Payment Summary

    Upwork Job

    BugZero Checklist (@mallenexpensify)

    • I have verified the correct assignees and roles are listed above and updated the necessary manual offers
    • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/2075198339661623091/hired)
    • I have verified the PR was not reverted
    • I have applied any discounts due to bugs/regressions introduced by this PR
    • I have paid out the Upwork contracts or cancelled the ones that are incorrect
    • I have verified the payment summary above is correct
  17. thesahindia commented on Jul 23, 2026

    @thesahindia
    Member

    @mallenexpensify, we missed this case in #88000. No payment is due here. We can close it.

  18. mallenexpensify commented on Jul 23, 2026

    @mallenexpensify
    Contributor

    Thanks @thesahindia payment summary removed.

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

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions