-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Search - Search history does not show the last 4 card digits #52192
Comments
Triggered auto assignment to @trjExpensify ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Search - Search history does not show the last 4 card digits What is the root cause of that problem?The root cause of this problem is that the application is not formatting or storing the card ID properly when updating the search history. Specifically, the application does not extract the last four digits of the card ID for display purposes, which leads to confusion when the search history is revisited. What changes do you think we should make in order to solve the problem?Modify the getFilterCardDisplayTitle function to display only the last 4 digits of the card ID. function getFilterCardDisplayTitle(filters, cards) {
const filterValue = filters[CONST.SEARCH.SYNTAX_FILTER_KEYS.CARD_ID];
if (filterValue) {
const filteredCards = Object.values(cards).filter((card) => filterValue.includes(card.cardID.toString()));
return filteredCards.map((card) => `**** **** **** ${card.cardID.toString().slice(-4)}`).join(', ');
}
return undefined;
} Update the searchAdvancedFilters state to store the card ID properly, ensuring the last 4 digits are displayed in the search history. const updatedFilters = {
...searchAdvancedFilters,
[CONST.SEARCH.SYNTAX_FILTER_KEYS.CARD_ID]: cardID, // Store full cardID or last 4 digits
}; What alternative solutions did you explore? (Optional) |
📣 @sarfaraz01578! 📣
|
Contributor details |
|
Contributor details |
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Search - Search history does not show the last 4 card digits What is the root cause of that problem?The root cause of this problem is that the application is not formatting or storing the card ID properly when updating the search history. Specifically, the application does not extract the last four digits of the card ID for display purposes, which leads to confusion when the search history is revisited. What changes do you think we should make in order to solve the problem?Modify the getFilterCardDisplayTitle function to display only the last 4 digits of the card ID. function getFilterCardDisplayTitle(filters, cards) {
const filterValue = filters[CONST.SEARCH.SYNTAX_FILTER_KEYS.CARD_ID];
if (filterValue) {
const filteredCards = Object.values(cards).filter((card) => filterValue.includes(card.cardID.toString()));
return filteredCards.map((card) => `**** **** **** ${card.cardID.toString().slice(-4)}`).join(', ');
}
return undefined;
} Update the searchAdvancedFilters state to store the card ID properly, ensuring the last 4 digits are displayed in the search history. const updatedFilters = {
...searchAdvancedFilters,
[CONST.SEARCH.SYNTAX_FILTER_KEYS.CARD_ID]: cardID, // Store full cardID or last 4 digits
}; What alternative solutions did you explore? (Optional) |
Edited by proposal-police: This proposal was edited at 2024-11-07 20:59:19 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
App/src/libs/SearchQueryUtils.ts Lines 531 to 533 in aedbbde
It only display the bank name. If the bank name data is not available, we revert to the card ID. In case of this bug, it only displays "Expensify Card". What changes do you think we should make in order to solve the problem?App/src/libs/SearchQueryUtils.ts Line 532 in aedbbde
should be updated to:
or
or
What alternative solutions did you explore? (Optional)
|
I can reproduce this. @luacmartins just want a hip check from you on whether this is known? I agree it gets confusing to not show the card you've selected to filter on. |
This is known and @Kicu is working on updates to the search results bar to display the correct names and work with autocomplete as well |
We can either close or put this on hold for now |
Dope, let's close it then! |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 9.0.59-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause - Internal Team
Issue found when executing PR #51633
Action Performed:
Precondition:
Expected Result:
The search history should show the last 4 card digits, as it will cause confusion if user searches for more than one virtual card
Actual Result:
The search history does not show the last 4 card digits
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6657686_1730989900879.20241107_222310.mp4
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: