Add search filters for Custom Field 1, Custom Field 2, and International Reimbursement IDs - #97337
Add search filters for Custom Field 1, Custom Field 2, and International Reimbursement IDs#97337MelvinBot wants to merge 2 commits into
Conversation
…nal Reimbursement IDs Co-authored-by: Shubham Agrawal <shubham1206agra@users.noreply.github.com>
|
🤖 I created this PR from an upstream branch ( If you can't push to the upstream branch directly and want to take ownership of it from your fork, run: Then you can close this PR and open a new one from your fork. |
|
I looked into the failing checks. All code/CI checks now pass — when your request came in, the test jobs, The only remaining failure is
That's the manual PR Author Checklist — it fails because the checklist boxes aren't ticked and the
I intentionally don't fill out the human author checklist or the Tests/QA sections on your behalf. Once you complete them, the |
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
| SUBMITTER_USER_ID_NOT: 'submitterUserIDNot', | ||
| SUBMITTER_USER_ID: 'submitterUserID', | ||
|
|
||
| SUBMITTER_PAYROLL_ID_NOT: 'submitterPayrollIDNot', | ||
| SUBMITTER_PAYROLL_ID: 'submitterPayrollID', | ||
|
|
||
| ORDER_DEAL_NUMBERS_NOT: 'orderDealNumbersNot', | ||
| ORDER_DEAL_NUMBERS: 'orderDealNumbers', |
|
The only failing checks are the PR Author Checklist and PR Reviewer Checklist — there's nothing for me to fix in code here. These aren't code/test failures. They fail because the checklists haven't been completed yet:
All actual CI (Bun tests, Jest |
|
The only two failing checks are the PR Author Checklist and PR Reviewer Checklist — neither is a code/CI failure, so there's nothing for me to fix or push here. Every actual check (Jest These two checks require manual, human action:
I can't complete either of these on your behalf — checking the author boxes and posting the reviewer checklist are actions the author and reviewer need to take. Once those are done, both checks will pass and the PR will be green. |
|
@MelvinBot Merge main please |
…stomFields Co-authored-by: Shubham Agrawal <shubham1206agra@users.noreply.github.com>
|
🤖 Merged |
|
@c3024 Can you look into |
|
No code fix is needed — every automated check on this PR passes. The only red check is I also reproduced the substantive checks locally on the branch to be sure nothing real is broken: Local verification
So there's nothing to push. Once you fill out the PR Author Checklist, this PR should be all green. |
Explanation of Change
PR #90937 added Custom Field 1 (
report.submitterUserID), Custom Field 2 (report.submitterPayrollID) and International Reimbursement IDs (report.orderDealNumbers) as display columns on the reports/expense search page, but there was no way to filter results by these fields.This PR registers the three fields as text filters, reusing the existing string-filter machinery (modeled on
title/reportID/description) so they appear as filter rows in the advanced-filters UI and can be typed directly in the search bar. Concretely:submitterUserID,submitterPayrollID,orderDealNumberstoSYNTAX_FILTER_KEYSplus kebab-case aliases inSEARCH_USER_FRIENDLY_KEYS(src/CONST/index.ts).baseRules.peggyand key alternations insearchParser.peggy+autocompleteParser.peggy, then regenerated the committed.jsparsers withnpm run generate-search-parserandnpm run generate-autocomplete-parser.buildQueryStringFromFilterFormValuesandbuildFilterFormValuesFromQuery(src/libs/SearchQueryUtils.ts)._NOTvariants) toTEXT_FILTER_KEYS,FILTER_KEYS, theEXPENSE/EXPENSE_REPORTallowed-filter sets, and the form value type (src/types/form/SearchAdvancedFiltersForm.ts), plus theSearchTextFilterKeysunion (src/components/Search/types.ts).EXPENSEandEXPENSE_REPORTsections ofuseAdvancedSearchFilters.tsand addedFILTER_VIEW_MAPentries (label + icon) insrc/libs/SearchUIUtils.ts, reusing the existing localized labelsworkspace.common.customField1,workspace.common.customField2andcommon.internationalReimbursementIDs.No new routes, screens or components are needed — advanced filters are param-driven through the generic
SEARCH_ADVANCED_FILTERS_CONTENTroute +TextInputFilterContent.Backend dependency: the server-side Search support for these three keys was handled separately in Auth PR #23009 (now merged).
Fixed Issues
$ #95389
PROPOSAL: #95389 (comment)
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, 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.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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari