feat: Add Withdrawal ID column to Expenses search and in report view.#89307
feat: Add Withdrawal ID column to Expenses search and in report view.#89307JS00001 merged 6 commits intoExpensify:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds support for displaying Withdrawal ID as a selectable column in the Expenses search table and in the expense report (transaction list) view, aligning Expenses with the existing Withdrawal ID filter/grouping capabilities.
Changes:
- Adds
withdrawalIDto theTransactionOnyx type and wires it into search/report table sorting. - Exposes Withdrawal ID as a selectable custom column for Expenses search and report-details columns.
- Updates translation-key mapping and adds a unit test for the new translation key.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/Search/SearchUIUtilsTest.ts | Adds a unit test for getSearchColumnTranslationKey() for WITHDRAWAL_ID. |
| src/types/onyx/Transaction.ts | Extends the transaction model with optional withdrawalID. |
| src/libs/SearchUIUtils.ts | Adds sorting mapping, translation key mapping, and ensures selected Withdrawal ID column is not filtered out. |
| src/libs/ReportUtils.ts | Makes Withdrawal ID sortable in report transaction lists and returns the sort value. |
| src/components/TransactionItemRow/index.tsx | Renders the Withdrawal ID value when the column is selected in report view. |
| src/CONST/index.ts | Adds Withdrawal ID to selectable custom columns for Expenses and report-details columns. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| CONST.SEARCH.TABLE_COLUMNS.TOTAL_PER_ATTENDEE, | ||
| CONST.SEARCH.TABLE_COLUMNS.WITHDRAWAL_ID, | ||
| ]); | ||
|
|
||
| return customResult.filter((col) => nonDataColumns.has(col) || columns[col]); |
There was a problem hiding this comment.
Add unit test coverage for the new WITHDRAWAL_ID column behavior in getColumnsToShow. Right now the logic relies on including WITHDRAWAL_ID in the nonDataColumns set so it isn't filtered out by data-presence checks; without a test, it's easy to regress and reintroduce the original bug (column not appearing after being selected). Consider extending the existing custom-columns tests to include WITHDRAWAL_ID and assert it remains visible even when transactions don't have a withdrawalID value.
| CONST.SEARCH.TABLE_COLUMNS.ACTION, | ||
| CONST.SEARCH.TABLE_COLUMNS.ATTENDEES, | ||
| CONST.SEARCH.TABLE_COLUMNS.TOTAL_PER_ATTENDEE, | ||
| CONST.SEARCH.TABLE_COLUMNS.WITHDRAWAL_ID, | ||
| ]); |
There was a problem hiding this comment.
The nonDataColumns comment says these columns "always have content", but WITHDRAWAL_ID (added here) can be legitimately empty. Consider rewording that comment to match the actual intent: columns that should not be filtered out by data-presence checks when explicitly selected in custom columns.
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@heyjennahay wanna' test this one as you requested it? |
|
@samranahm typcheck fail |
|
Fixing.. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppN/A Android: mWeb ChromeN/A iOS: HybridAppN/A iOS: mWeb SafariN/A MacOS: Chrome / Safarimac.safari.mp4 |
|
@dmkt9 All yours. |
trjExpensify
left a comment
There was a problem hiding this comment.
New addition Jenna wanted! 👍
|
🚧 @JS00001 has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/JS00001 in version: 9.3.66-0 🚀
|
|
After reviewing PR changes and the help site docs under The column customization article (Using-Reports-in-New-Expensify.md) intentionally avoids enumerating all available columns, listing only a few examples and directing users to the UI:
Since the docs defer to the product UI for column discovery, adding the new Withdrawal ID column doesn't create a documentation gap. |
Explanation of Change
Fixed Issues
$ #88384
PROPOSAL: #88384 (comment)
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
Same as test
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
N/A for smaller screens.Android: mWeb Chrome
N/A for smaller screens.
iOS: Native
N/A for smaller screens.
iOS: mWeb Safari
N/A for smaller screens.
MacOS: Chrome / Safari
macOS.Chrome.mp4