Skip to content

[Due for payment 2025-04-10] [$250] Search - Suggestion list does not appear when searching with card's last four #57994

Closed

Description

@mitarachim

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.1.10-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
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: Exp
Email or phone of affected tester (no customers): applausetester+ps309@applause.expensifail.com
Issue reported by: Applause Internal Team
Device used: Mac 15.3 / Chrome
App Component: Search

Action Performed:

Precondition:

  • User has assigned two virtual cards to themselves.
  1. Go to staging.new.expensify.com
  2. Go to Reports.
  3. Click on the search field.
  4. Type card:expensify.
  5. Type card:card.
  6. Note that suggestion list appears for both search queries - card:expensify and card:card.
  7. Type card: and followed by the card's last four digits.

Expected Result:

The suggestion list will appear when searching with card's last four.

Actual Result:

The suggestion list does not appear when searching with card's last four.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6763667_1741329826581.20250307_144055.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021898047057933581434
  • Upwork Job ID: 1898047057933581434
  • Last Price Increase: 2025-03-07
  • Automatic offers:
    • nkdengineer | Contributor | 106499129
Issue OwnerCurrent Issue Owner: @lschurr

Activity

  1. added
    Bug
    Daily
    on Mar 7, 2025
  2. melvin-bot commented on Mar 7, 2025

    @melvin-bot

    Triggered auto assignment to @lschurr (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  3. nkdengineer commented on Mar 7, 2025

    @nkdengineer
    Contributor

    🚨 Edited by proposal-police: This proposal was edited at 2025-03-07 08:51:29 UTC.

    Proposal

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

    The suggestion list does not appear when searching with card's last four.

    What is the root cause of that problem?

    We do not check with card.lastFourPAN in here

    .filter((card) => card.bank.toLowerCase().includes(autocompleteValue.toLowerCase()) && !alreadyAutocompletedKeys.includes(getCardDescription(card.cardID).toLowerCase()))

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

    We should update this condition to use lastFourPAN

            const filteredCards = cardAutocompleteList
                .filter((card) => isCard(card) && !isCardHiddenFromSearch(card))
                .filter((card) => (card.bank.toLowerCase().includes(autocompleteValue.toLowerCase()) || card.lastFourPAN?.includes(autocompleteValue.toLowerCase())) && !alreadyAutocompletedKeys.includes(getCardDescription(card.cardID).toLowerCase()))
                .sort()
                .slice(0, 10);
    
    
    Image

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    We have file test with search card data here. We should add new test at this file

    What alternative solutions did you explore? (Optional)

    Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

  4. added
    External
    on Mar 7, 2025
  5. changed the title [-]Search - Suggestion list does not appear when searching with card's last four[/-] [+][$250] Search - Suggestion list does not appear when searching with card's last four[/+] on Mar 7, 2025
  6. melvin-bot commented on Mar 7, 2025

    @melvin-bot
  7. added
    Help Wanted
    on Mar 7, 2025
  8. melvin-bot commented on Mar 7, 2025

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @s77rt (External)

  9. s77rt commented on Mar 8, 2025

    @s77rt
    Member

    @nkdengineer Thanks for the proposal. Your RCA and solution looks good to me.

    🎀 👀 🎀 C+ reviewed
    Link to proposal

  10. melvin-bot commented on Mar 8, 2025

    @melvin-bot

    Triggered auto assignment to @MonilBhavsar, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

  11. nkdengineer commented on Mar 12, 2025

    @nkdengineer
    Contributor

    friendly bump @MonilBhavsar

  12. 9 remaining items

  13. added
    Weekly
    Awaiting Payment
    and removed
    Weekly
    on Apr 3, 2025
  14. changed the title [-][$250] Search - Suggestion list does not appear when searching with card's last four[/-] [+][Due for payment 2025-04-10] [$250] Search - Suggestion list does not appear when searching with card's last four[/+] on Apr 3, 2025
  15. melvin-bot commented on Apr 3, 2025

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  16. removed
    Reviewing
    on Apr 3, 2025
  17. melvin-bot commented on Apr 3, 2025

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.22-10 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 2025-04-10. 🎊

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

  18. melvin-bot commented on Apr 3, 2025

    @melvin-bot

    @s77rt @lschurr @s77rt 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]

  19. s77rt commented on Apr 7, 2025

    @s77rt
    Member

    BugZero Checklist:

    • [Contributor] Classify the bug:
    Bug classification

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other:

    Where bug was reported:

    • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
    • 2b. Reported on staging (eg. found during regression or PR testing)
    • 2d. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other:
    • [Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

      Link to comment: Provide autocomplete suggestions in SearchRouterList #51237 (comment)

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

      Link to discussion: n/a

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

      Bug requires regression test: Yes

    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue:

    Regression Test Proposal

    Precondition:

    • Usar has been assigned a card

    Test:

    1. Go to Reports
    2. In search bar type card:1234 where 1234 is your card`s last four digits
    3. Verify that the card shows up in the autosuggestion list

    Do we agree 👍 or 👎

  20. added
    Daily
    and removed
    Weekly
    on Apr 10, 2025
  21. lschurr commented on Apr 10, 2025

    @lschurr
    Contributor

    Payment summary:

  22. JmillsExpensify commented on Apr 14, 2025

    @JmillsExpensify
    Contributor

    $250 approved for @s77rt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentBugDailyExternal

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions