Skip to content

[Due for payment 2026-11-03] [CFI] Add the Withdrawal ID custom column to expense report searches #104139

Closed

Description

@melvin-bot

Feature request

Add the Withdrawal ID column to the custom columns on Spend > Reports (type:expense-report searches).

Background

The Withdrawal ID column already exists as a custom column on expense searches (added in #88384). Bank reconciliation also uses it. Expense report searches don't offer it as a custom column.

Problem

Customers want to see the withdrawal ID tied to each report, when one applies. Today they can filter reports by withdrawal ID. They can't show it as a column, so they have to open each report to find it.

Solution

Add Withdrawal ID as a selectable custom column on expense report searches. It should match the expense-level column.

Reported in Slack.

Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

  1. changed the title [-]Add the `Withdrawal ID` custom column to expense report searches[/-] [+][CFI] Add the `Withdrawal ID` custom column to expense report searches[/+] on Oct 15, 2026
  2. trjExpensify commented on Oct 15, 2026

    @trjExpensify
    Contributor

    @MelvinBot propose a solution to this.

  3. MelvinBot commented on Oct 15, 2026

    @MelvinBot
    Contributor

    Proposal

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

    Expense report searches (type:expense-report) don't offer Withdrawal ID as a custom column, though expense searches do.

    What is the root cause of that problem?

    Two gaps:

    1. App: WITHDRAWAL_ID isn't in the report column list, TYPE_CUSTOM_COLUMNS.EXPENSE_REPORT. The report row and header don't render it either.
    2. Data: The expense column reads transaction.withdrawalID (TransactionItemRowWide.tsx:683-690). The Report type has no withdrawal ID field, so Search returns nothing for the App to show on report rows.

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

    Backend first (internal): Search should return a report-level withdrawalID on each report in type:expense-report results. It should also support sortBy:withdrawalID. An internal engineer needs to make this change.

    App: Follow the pattern used for ORDER_DEAL_NUMBERS (International Reimbursement IDs):

    1. Add WITHDRAWAL_ID to TYPE_CUSTOM_COLUMNS.EXPENSE_REPORT, but not to the default columns. The column key, query value, style and common.withdrawalID translation already exist.
    2. Add withdrawalID?: string to Report, whitelistedReportKeys.ts, the report selector, and DebugUtils.
    3. Render a TextCell in ExpenseReportListItemRowWide.tsx. Add a header entry in getExpenseReportHeaders.
    4. Add a WITHDRAWAL_ID case to getReportCustomColumnValue.
    5. Add the column to reportCustomColumns, so it hides when no report on the page has a value. Add it to the report sort branch at SearchUIUtils.ts:4260.
    6. Add a case to getExpenseReportColumnContentToMeasure for column width.
    7. Add tests in tests/unit/Search/SearchUIUtilsTest.ts, modeled on the Amount debited tests. Cover sorting, and cover showing or hiding the column in getColumnsToShow.

    Decided (confirmed by trjExpensify): if a report has several withdrawals (for example, a reimbursement and an Expensify Card settlement), the backend returns them as one comma-separated string in withdrawalID, like International Reimbursement IDs. The App shows that string as is.

    What alternative solutions did you explore? (Optional)

    Derive the ID from each row's transactions in the App. I rejected this. A row may not hold every transaction on the report, a report can have several IDs, and sorting across pages needs the backend.

    References

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


    view run

  4. trjExpensify commented on Oct 15, 2026

    @trjExpensify
    Contributor

    Decide before the backend work starts: if a report has several withdrawals (for example, a reimbursement and an Expensify Card settlement), show them comma-joined, like International Reimbursement IDs.

    @MelvinBot makes sense to comma-separate them. 👍

  5. trjExpensify commented on Oct 15, 2026

    @trjExpensify
    Contributor

    Backend first (internal): Search should return a report-level withdrawalID on each report in type:expense-report results. It should also support sortBy:withdrawalID. An internal engineer needs to make this change.

    @c3024 fancy this one after paid:? CC: @JS00001

  6. MelvinBot commented on Oct 15, 2026

    @MelvinBot
    Contributor

    👍 I updated the proposal to record this decision.

    The backend returns one comma-separated string in the report's withdrawalID, and the App shows it as is. International Reimbursement IDs work the same way: the App renders orderDealNumbers directly (ExpenseReportListItemRowWide.tsx:239). No extra App formatting is needed.

  7. self-assigned this
    on Oct 16, 2026
  8. self-assigned this
    on Oct 16, 2026
  9. JS00001 commented on Oct 16, 2026

    @JS00001
    Contributor

    Cool, lets do it

  10. JS00001 commented on Oct 19, 2026

    @JS00001
    Contributor

    Looks like a PR is in progress ^

  11. 17 remaining items

  12. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Oct 29, 2026
  13. melvin-bot commented on Nov 2, 2026

    @melvin-bot
    Author

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  14. melvin-bot commented on Nov 2, 2026

    @melvin-bot
    Author

    Payment Summary

    Resolving PRs:

    BugZero Checklist (@mallenexpensify)

    • I have confirmed assignees, roles, and Upwork contracts look correct
    • I have paid out Upwork contracts / manual NewDot requests
    • [BugZero Assignee] I have created a GH issue for creating/updating the regression test once above steps have been agreed upon
  15. melvin-bot commented on Nov 5, 2026

    @melvin-bot
    Author

    @mallenexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  16. mallenexpensify commented on Nov 6, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor+: @truph01 due $175 via NewDot

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 productionDailyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions