Skip to content

[Due for payment 2026-02-20] [$250] Attendees field - Attendees field shows only title to the invited to the report user #80687

Closed

Description

@lanitochka17

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.3.10-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: #79741
Email or phone of affected tester (no customers): N/A
Issue reported by: Applause Internal Team
Bug source: Pull Request QA execution
Device used: MacBook air 15.7.3 chrome
App Component: Money Requests

Action Performed:

Preconditions: Rules are enabled.
Enable Attendee tracking in Rules.

  1. As User A, create two expenses in the workspace chat
  2. Open the expense report, mention User B and send it to the report.
  3. Click Invite to chat only.
  4. As User B, open the report.
  5. Verify that User B can see Attendees field.

Expected Result:

User B can see the Attendees field

Actual Result:

User B can see only the title of the Attendees field

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7059655_1769550171251.PR_attendies.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022016275934616395321
  • Upwork Job ID: 2016275934616395321
  • Last Price Increase: 2026-01-27
  • Automatic offers:
    • NJ-2020 | Contributor | 110334820
Issue OwnerCurrent Issue Owner: @NicMendonca

Activity

  1. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Jan 27, 2026
  2. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jan 27, 2026
  3. changed the title [-]Attendees field - Attendees field shows only title to the invited to the report user[/-] [+][$250] Attendees field - Attendees field shows only title to the invited to the report user[/+] on Jan 27, 2026
  4. melvin-bot commented on Jan 27, 2026

    @melvin-bot
  5. melvin-bot commented on Jan 27, 2026

    @melvin-bot

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

  6. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Jan 27, 2026
  7. melvin-bot commented on Jan 27, 2026

    @melvin-bot

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

  8. sivaadityacoder commented on Jan 28, 2026

    @sivaadityacoder

    Proposal
    Problem Restatement
    When User B (invited to a report) opens the expense report, the Attendees field shows only the label "Attendees" but not the list of attendee names. The title area is empty even though attendees exist on the transaction.

    Root Cause Analysis
    The issue is in
    src/components/ReportActionItem/MoneyRequestView.tsx
    at line 699.

    The Bug:

    const getAttendeesTitle = Array.isArray(actualAttendees) ? actualAttendees.map((item) => item?.displayName ?? item?.login).join(', ') : '';
    Why it fails for invited users:

    Line 267: transactionAttendees is extracted from getTransactionDetails()
    Line 290: actualAttendees is set to transactionAttendees
    Line 699: getAttendeesTitle tries to map over actualAttendees
    The problem: For invited users (User B), getTransactionDetails() calls
    getAttendees()
    from
    src/libs/TransactionUtils/index.ts
    (lines 1145-1153), which:

    Returns transaction?.comment?.attendees if it exists
    Falls back to
    getReportOwnerAsAttendee()
    if attendees array is empty
    getReportOwnerAsAttendee()
    (lines 1091-1124) calls getPersonalDetailsByIDs()
    For invited users without cached personal details, this returns undefined
    When creatorDetails is undefined, creatorEmail becomes empty string
    The function returns undefined instead of a valid attendee object
    This causes actualAttendees to be an empty array []
    Line 699: getAttendeesTitle becomes an empty string ''
    The MenuItemWithTopDescription component (line 1072) renders with title="" (empty)
    Result: Only the description "Attendees" shows, no names
    Proposed Solution
    Fix
    getReportOwnerAsAttendee()
    in
    src/libs/TransactionUtils/index.ts
    (lines 1091-1124):

    Current code (lines 1117-1132):

    if (creatorAccountID) {
    const [creatorDetails] = getPersonalDetailsByIDs({accountIDs: [creatorAccountID]});
    const creatorEmail = creatorDetails?.login ?? '';
    const creatorDisplayName = creatorDetails?.displayName ?? creatorEmail;
    if (creatorEmail) {
    return {
    email: creatorEmail,
    login: creatorEmail,
    displayName: creatorDisplayName,
    accountID: creatorAccountID,
    text: creatorDisplayName,
    searchText: creatorDisplayName,
    avatarUrl: creatorDetails?.avatarThumbnail ?? '',
    selected: true,
    };
    }
    }
    Fixed code:

    if (creatorAccountID) {
    const [creatorDetails] = getPersonalDetailsByIDs({accountIDs: [creatorAccountID]});

    // Always return attendee object even if personal details aren't cached
    // This ensures invited users can see the attendee field
    const creatorEmail = creatorDetails?.login ?? '';
    const creatorDisplayName = creatorDetails?.displayName ?? creatorEmail || `Account ${creatorAccountID}`;
    return {
        email: creatorEmail,
        login: creatorEmail,
        displayName: creatorDisplayName,
        accountID: creatorAccountID,
        text: creatorDisplayName,
        searchText: creatorDisplayName,
        avatarUrl: creatorDetails?.avatarThumbnail ?? '',
        selected: true,
    };
    

    }
    Key change: Remove the if (creatorEmail) check and provide a fallback display name using the account ID when personal details aren't available.

    Why This Fix Works
    Preserves existing behavior for users with cached personal details
    Fixes the bug for invited users by always returning an attendee object
    Provides graceful fallback with Account ${creatorAccountID} when email is unavailable
    Minimal change - only removes one conditional check and adds one fallback
    No breaking changes - all existing flows continue to work
    Alternative Considered
    Modify
    getAttendees()
    to check transaction?.comment?.attendees first and only call
    getReportOwnerAsAttendee()
    when truly empty. However, this doesn't solve the underlying issue that
    getReportOwnerAsAttendee()
    can return undefined for valid scenarios.

    Testing Plan
    As User A (Admin):

    Enable Attendee tracking in Rules
    Create two expenses in workspace chat
    Add attendees to the expenses
    Open expense report, mention User B
    Send to report, click "Invite to chat only"
    As User B (Invited User):

    Open the report
    Navigate to the expense with attendees
    Verify: Attendees field shows the list of names (not just "Attendees" label)
    Verify: Field is read-only (no edit icon)
    Regression Testing:

    Verify admin users still see attendees correctly
    Verify unreported expenses still show current user as default attendee
    Verify attendee editing still works for users with permissions
    Files Modified
    src/libs/TransactionUtils/index.ts
    (lines 1117-1132)

  9. yatin-italy commented on Jan 28, 2026

    @yatin-italy

    Proposal

    Restate the problem this issue is trying to solve.

    When an invited user opens a shared expense report, the Attendees field shows only the label with no names. The title area is empty even though the transaction has attendees. This stops invited users from seeing who attended the expense.

    What is the root cause of that problem?

    The root cause is a wrong fallback assumption in src/libs/TransactionUtils/index.ts inside the functions getAttendees() and getReportOwnerAsAttendee(). The code assumes personal details are always cached when falling back to the report owner. For invited users, getPersonalDetailsByIDs() can return no data, so creatorEmail is empty in getReportOwnerAsAttendee(). Because of this, the function returns undefined, which makes getAttendees() return an empty array.

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

    File: src/libs/TransactionUtils/index.ts

    Update getAttendees() to use existing attendee data first.
    Return early when transaction.comment.attendees or transaction.modifiedAttendees exists and has items.
    Only call getReportOwnerAsAttendee() when the attendees array is truly empty.

    Code change in getAttendees() (around lines 980–987):

    function getAttendees(
        transaction: OnyxInputOrEntry<Transaction>,
        currentUserPersonalDetails: CurrentUserPersonalDetails | undefined,
    ): Attendee[] {
        const attendees = transaction?.modifiedAttendees
            ? transaction.modifiedAttendees
            : (transaction?.comment?.attendees ?? []);
    
        if (attendees.length > 0) {
            return attendees;
        }
    
        const reportOwnerAsAttendee = getReportOwnerAsAttendee(transaction, currentUserPersonalDetails);
        if (reportOwnerAsAttendee !== undefined) {
            attendees.push(reportOwnerAsAttendee);
        }
    
        return attendees;
    }

    Update getReportOwnerAsAttendee() to return undefined when personal details are not cached.
    Do not create fallback data when creatorEmail is missing.

    Code change in getReportOwnerAsAttendee() (around lines 941–961):

    if (creatorAccountID) {
        const [creatorDetails] = getPersonalDetailsByIDs({accountIDs: [creatorAccountID]});
        const creatorEmail = creatorDetails?.login ?? '';
        const creatorDisplayName = creatorDetails?.displayName ?? creatorEmail;
    
        if (creatorEmail) {
            return {
                email: creatorEmail,
                login: creatorEmail,
                displayName: creatorDisplayName,
                accountID: creatorAccountID,
                text: creatorDisplayName,
                searchText: creatorDisplayName,
                avatarUrl: creatorDetails?.avatarThumbnail ?? '',
                selected: true,
            };
        }
    }

    What alternative solutions did you explore? (Optional)

    • Client-side fetching of personal details was not chosen because personal details should come from the OpenReport API.
    • Creating fake or synthetic email data was not chosen because the client should not invent user data.
    • Using report.participants was not chosen because it does not contain login or email fields and would break typing.
  10. NJ-2020 commented on Jan 28, 2026

    @NJ-2020
    Contributor

    Proposal

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

    Attendees field - Attendees field shows only title to the invited to the report user

    What is the root cause of that problem?

    After User A invited User B, the BE returns empty transaction.comment.attendees so we'll fallback to the owner of the report as the attendee by using getReportOwnerAsAttendee

    <MenuItemWithTopDescription
    key="attendees"
    title={getAttendeesTitle}

    attendees: transactionAttendees,

    attendees: getAttendees(transaction, currentUserDetails),

    Screen.Recording.2026-01-28.at.13.23.03.mp4

    So, if transaction.comment.attendees is equal to undefined which can happen in some cases, then we fallback (create new attendee) based on the report owner

    function getAttendees(transaction: OnyxInputOrEntry<Transaction>, currentUserPersonalDetails: CurrentUserPersonalDetails | undefined): Attendee[] {
    const attendees = transaction?.modifiedAttendees ? transaction.modifiedAttendees : (transaction?.comment?.attendees ?? []);
    const reportOwnerAsAttendee = getReportOwnerAsAttendee(transaction, currentUserPersonalDetails);
    if (attendees.length === 0 && reportOwnerAsAttendee !== undefined) {
    attendees.push(reportOwnerAsAttendee);
    }
    return attendees;
    }

    But in this case getReportOwnerAsAttendee fail to create new attendee, because it will only create/return the attendee if creatorEmail/creatorDetails?.login is valid/exists

    if (creatorAccountID) {
    const [creatorDetails] = getPersonalDetailsByIDs({accountIDs: [creatorAccountID], currentUserAccountID: currentUserPersonalDetails?.accountID});
    const creatorEmail = creatorDetails?.login ?? '';
    const creatorDisplayName = creatorDetails?.displayName ?? creatorEmail;
    if (creatorEmail) {
    return {
    email: creatorEmail,

    But since BE doesn't return/include the login property for the personal detail (report owner), it returns empty in this case which causes the above check condition to return false

    Image

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

    I think if creatorDetails?.login is empty, we should fallback to creatorDetails?.displayName similarly like we do in other places

    login: attendee.email ? attendee.email : attendee.displayName,

    login: attendee.email ? attendee.email : attendee.displayName,

    function getReportOwnerAsAttendee(transaction: OnyxInputOrEntry<Transaction>, currentUserPersonalDetails: CurrentUserPersonalDetails | undefined): Attendee | undefined {
        ...
    
        if (creatorAccountID) {
            const [creatorDetails] = getPersonalDetailsByIDs({accountIDs: [creatorAccountID], currentUserAccountID: currentUserPersonalDetails?.accountID});
            const creatorEmail = creatorDetails?.login ?? creatorDetails?.displayName ?? '';
            const creatorDisplayName = creatorDetails?.displayName ?? creatorEmail;
    
            if (creatorEmail) {
                return {
                    email: creatorEmail,
                    login: creatorEmail,
                    displayName: creatorDisplayName,
                    accountID: creatorAccountID,
                    text: creatorDisplayName,
                    searchText: creatorDisplayName,
                    avatarUrl: creatorDetails?.avatarThumbnail ?? '',
                    selected: true,
                };
            }
        }
    }

    Result

    Screen.Recording.2026-01-28.at.13.42.42.mov

    What alternative solutions did you explore? (Optional)

  11. 29 remaining items

  12. melvin-bot commented on Feb 13, 2026

    @melvin-bot

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

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

  13. melvin-bot commented on Feb 13, 2026

    @melvin-bot

    @truph01 @NicMendonca 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. NicMendonca commented on Feb 20, 2026

    @NicMendonca
    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:

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

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

    Regression Test Proposal Template
    • [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:

    Test:

    Do we agree 👍 or 👎

  15. NicMendonca commented on Feb 24, 2026

    @NicMendonca
    Contributor

    @truph01 bump on the BZ checklist here

  16. truph01 commented on Feb 24, 2026

    @truph01
    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:

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

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

    Regression Test Proposal

    Precondition:

    Test:

    Preconditions: Rules are enabled > Enable Attendee tracking

    1. As User A, create two expenses in the workspace chat
    2. Open the expense report, mention User B and send it to the report.
    3. Click Invite to chat only.
    4. As User B, open the report.
    5. Verify that: User B can see the assigned person in the attendee field.
      Do we agree 👍 or 👎
  17. NicMendonca commented on Feb 25, 2026

    @NicMendonca
    Contributor

    Payment Summary

    • Contributor: @NJ-2020 paid $250 via Upwork (done ✅ )
    • Contributor+: @truph01 due $250 via NewDot
  18. JmillsExpensify commented on Mar 18, 2026

    @JmillsExpensify
    Contributor

    $250 approved for @truph01

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.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions