Skip to content

[Due for payment 2025-05-22] [Due for payment 2025-05-20] Workspace - Searching for member using full name returns no result #61650

Closed

Description

@jponikarchuk

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.42-0
Reproducible in staging?: Yes
Reproducible in production?: Unable to check, new feature
If this was caught during regression testing, add the test name, ID and link from TestRail: #60488
Email or phone of affected tester (no customers): applausetester+300402kh@applause.expensifail.com
Issue reported by: Applause Internal Team
Device used: Mac 15.3 / Chrome
App Component: Workspace Settings

Action Performed:

Precondition:

  • Have a workspace with at least 16 members.
  • At least one member has first and last name.
  1. Go to staging.new.expensify.com
  2. Go to workspace settings > Members.
  3. Search for the member with first and last name using the full name.

Expected Result:

The search result will return the member with the full name.

Actual Result:

The search result returns nothing when searching for member using full name.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

1.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @strepanier03

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on May 8, 2025
  2. melvin-bot commented on May 8, 2025

    @melvin-bot

    Triggered auto assignment to @cristipaval (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

  3. melvin-bot commented on May 8, 2025

    @melvin-bot

    Triggered auto assignment to @strepanier03 (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.

  4. melvin-bot commented on May 8, 2025

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  5. github-actions commented on May 8, 2025

    @github-actions
    Contributor

    👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  6. daledah commented on May 8, 2025

    @daledah
    Contributor

    Coming from #60488, I'll open a follow-up soon.

  7. nabi-ebrahimi commented on May 8, 2025

    @nabi-ebrahimi

    Proposal

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

    When a user searches for a member using a full name or partial full name (e.g., "Jane D" or "zarin 3"), the member is not returned unless the search query exactly matches one of the fields (text or alternateText). This results in unexpected behavior, where valid partial name matches do not appear in the search results.

    What is the root cause of that problem?

    The filtering logic only checks if the search query is found within either text or alternateText separately. It also lacks proper normalization of the data, so partial matches like "zarin 3" do not match "zarin 30" even though the beginning of the name clearly aligns. In addition, queries that span both the first and last name (e.g., "Jane D") also fail, because the match isn’t performed on a combined and normalized name string.

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

    Update the filterMember function to:

      const normalize = (value: string) => value.toLowerCase().replace(/\s+/g, ' ').trim();
    
        const filterMember = useCallback((memberOption: MemberOption, searchQuery: string) => {
            const fullText = normalize(`${memberOption.text ?? ''} ${memberOption.alternateText ?? ''}`);
            const normalizedQuery = normalize(searchQuery);
            return fullText.includes(normalizedQuery);
        }, []);
    • Concatenate both text and alternateText fields.

    • Normalize the combined string and the user input by:

      • Converting to lowercase
      • Replacing multiple spaces with a single space
      • Trimming surrounding spaces
        Then, check if the normalized query is included in the normalized combined string.

    This approach ensures that partial and full-name queries like "Jane D", "zarin 3", or "Jane Sharifi" work reliably.

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

    None

    What alternative solutions did you explore? (Optional)

  8. github-actions commented on May 8, 2025

    @github-actions
    Contributor

    ⚠️ @nabi-ebrahimi Thanks for your proposal. Please update it to follow the proposal template, as proposals are only reviewed if they follow that format (note the mandatory sections).

  9. 21 remaining items

  10. melvin-bot commented on May 9, 2025

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  11. melvin-bot commented on May 9, 2025

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  12. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on May 13, 2025
  13. changed the title [-]Workspace - Searching for member using full name returns no result[/-] [+][Due for payment 2025-05-20] Workspace - Searching for member using full name returns no result[/+] on May 13, 2025
  14. melvin-bot commented on May 13, 2025

    @melvin-bot

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

  15. melvin-bot commented on May 13, 2025

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.44-8 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-05-20. 🎊

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

    • @daledah requires payment (Needs manual offer from BZ)
  16. melvin-bot commented on May 13, 2025

    @melvin-bot

    @roryabraham @strepanier03 @daledah 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]

  17. changed the title [-][Due for payment 2025-05-20] Workspace - Searching for member using full name returns no result[/-] [+][Due for payment 2025-05-22] [Due for payment 2025-05-20] Workspace - Searching for member using full name returns no result[/+] on May 15, 2025
  18. melvin-bot commented on May 15, 2025

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.45-21 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-05-22. 🎊

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

    • @daledah requires payment (Needs manual offer from BZ)
  19. melvin-bot commented on May 15, 2025

    @melvin-bot

    @roryabraham @strepanier03 @daledah 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]

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 productionBugSomething is broken. Auto assigns a BugZero manager.EngineeringWeeklyKSv2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions