Skip to content

[Due for payment 2025-12-19] [$250] Expense - Selected attendee does not show up when searched with name #75796

Closed

Description

@vincdargento

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.2.62-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #71849
Email or phone of affected tester (no customers): applausetester+181104kh@applause.expensifail.com
Issue reported by: Applause Internal Team
Device used: Mac 15.5 / Chrome
App Component: Money Requests

Action Performed:

Precondition:

  • Attendee tracking is enabled in workspace settings > Rules.
  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Click + > Create expense > Manual.
  4. Enter amount > Next.
  5. On confirm page, click Attendee field.
  6. Select any user that is already in your contact.
  7. Type the name of the selected user.

Expected Result:

The selected attendee will appear when searched with name.

Actual Result:

The selected attendee does not appear when searched with 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

bug.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021993806177656215981
  • Upwork Job ID: 1993806177656215981
  • Last Price Increase: 2025-11-26

Activity

  1. added
    Daily
    Bug
    on Nov 21, 2025
  2. melvin-bot commented on Nov 21, 2025

    @melvin-bot

    Triggered auto assignment to @heyjennahay (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. samranahm commented on Nov 21, 2025

    @samranahm
    Contributor

    Proposal

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

    Expense - Selected attendee does not show up when searched with name

    What is the root cause of that problem?

    The MoneyRequestAttendeeSelector component using the attendees prop (which comes from the parent component) instead of the selectedOptions state from the useSearchSelector hook when calling formatSectionsFromSearchTerm. This caused the selected attendee filtering logic to work with stale data.

    attendees.map((attendee) => ({
    ...attendee,
    reportID: CONST.DEFAULT_NUMBER_ID.toString(),
    selected: true,
    login: attendee.email,
    ...getPersonalDetailByEmail(attendee.email),
    })),

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

    we should use selectedOptions

    here

    attendees.map((attendee) => ({
    ...attendee,
    reportID: CONST.DEFAULT_NUMBER_ID.toString(),
    selected: true,
    login: attendee.email,
    ...getPersonalDetailByEmail(attendee.email),
    })),

    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. bernhardoj commented on Nov 24, 2025

    @bernhardoj
    Contributor

    Proposal

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

    Selected attendees don't show when we search it.

    What is the root cause of that problem?

    The selected attendee will show if the search keyword matches the personal detail search terms.

    const selectedParticipantsWithoutDetails = selectedOptions.filter((participant) => {
    const accountID = participant.accountID ?? null;
    const isPartOfSearchTerm = getPersonalDetailSearchTerms(participant).join(' ').toLowerCase().includes(cleanSearchTerm);

    The problem is, the attendee display name is not included as the search terms. It includes the display name from participantList which is only available for report data and from text for current user.

    function getPersonalDetailSearchTerms(item: Partial<SearchOptionData>) {
    if (item.accountID === currentUserAccountID) {
    return getCurrentUserSearchTerms(item);
    }
    return [item.participantsList?.[0]?.displayName ?? '', item.login ?? '', item.login?.replace(CONST.EMAIL_SEARCH_REGEX, '') ?? ''];
    }
    function getCurrentUserSearchTerms(item: Partial<SearchOptionData>) {
    // eslint-disable-next-line @typescript-eslint/no-deprecated
    return [item.text ?? '', item.login ?? '', item.login?.replace(CONST.EMAIL_SEARCH_REGEX, '') ?? '', translateLocal('common.you'), translateLocal('common.me')];
    }

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

    Update both getPersonalDetailSearchTerms and getCurrentUserSearchTerms to include item.displayName as the search terms.

    Also, update the header message here to include selected options length for the first param (hasSelectableOptions)

    formatResults.section.data.length + (orderedAvailableOptions.personalDetails ?? []).length + (orderedAvailableOptions.recentReports ?? []).length !== 0,
  5. added
    External
    on Nov 26, 2025
  6. changed the title [-]Expense - Selected attendee does not show up when searched with name[/-] [+][$250] Expense - Selected attendee does not show up when searched with name[/+] on Nov 26, 2025
  7. melvin-bot commented on Nov 26, 2025

    @melvin-bot
  8. added
    Help Wanted
    on Nov 26, 2025
  9. melvin-bot commented on Nov 26, 2025

    @melvin-bot

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

  10. 17 remaining items

  11. removed
    Reviewing
    on Dec 12, 2025
  12. melvin-bot commented on Dec 12, 2025

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.2.77-1 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-12-19. 🎊

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

    • @jjcoffee requires payment through NewDot Manual Requests
    • @bernhardoj requires payment through NewDot Manual Requests
  13. melvin-bot commented on Dec 12, 2025

    @melvin-bot

    @jjcoffee / @bernhardoj @heyjennahay 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]

  14. jjcoffee commented on Dec 19, 2025

    @jjcoffee
    Contributor

    BugZero Checklist:

    • [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: https://github.com/Expensify/App/pull/46409/files#r2634301587

    • [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.

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

      Link to issue: https://github.com/Expensify/Expensify/issues/581313

    Regression Test Proposal

    Precondition:

    • Attendee tracking is enabled in workspace settings > Rules
    • Have a user with a display name in your contacts

    Test:

    1. Create an expense in the workspace chat
    2. Open the expense thread and press the Attendee field.
    3. Select any user with a display name that is already in your contacts
    4. Search the name of the selected user
    5. Verify the user is shown

    Do we agree 👍 or 👎

  15. added
    Daily
    and removed
    Weekly
    on Dec 19, 2025
  16. melvin-bot commented on Dec 19, 2025

    @melvin-bot

    Payment Summary

    Upwork Job

    BugZero Checklist (@heyjennahay)

    • (if NewFeature) I have created a PR for any necessary HelpDot updates, or I confirmed no updates are necessary.
    • I have verified the correct assignees and roles are listed above and updated the necessary manual offers
    • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/1993806177656215981/hired)
    • I have verified the PR was not reverted
    • I have applied any discounts due to bugs/regressions introduced by this PR
    • I have paid out the Upwork contracts or cancelled the ones that are incorrect
    • I have verified the payment summary above is correct
  17. heyjennahay commented on Dec 22, 2025

    @heyjennahay
    Contributor

    Payment summary:

    • @jjcoffee please request $250 payment via NewDot
    • @bernhardoj please request $250 payment via NewDot

    Closed job https://www.upwork.com/ab/applicants/1993806177656215981/job-details

    Thanks everyone for your work!

  18. bernhardoj commented on Dec 22, 2025

    @bernhardoj
    Contributor

    Requested in ND.

  19. JmillsExpensify commented on Dec 23, 2025

    @JmillsExpensify
    Contributor

    $250 approved for @jjcoffee

  20. garrettmknight commented on Dec 29, 2025

    @garrettmknight
    Contributor

    $250 approved for @bernhardoj

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

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions