Skip to content

[Merge] Expense - Attendee section is missing when merging expenses when name is selected as attendee #78225

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.2.85-0
Reproducible in staging?: Yes
Reproducible in production?: N/A - new feature, doesn't exist in prod
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #77995
Email or phone of affected tester (no customers): soijdnosidjoijidosj@gmail.com
Issue reported by: Applause Internal Team
Bug source: Pull Request QA execution
Device used: Mac 26.1 / Chrome
App Component: Money Requests

Action Performed:

Preconditon:

  • Rules are enabled.
  • Attendee tracking is enabled in Rules.
  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Create two manual expenses and select name (not email) on Attendees field.
  4. Open the expense report.
  5. Open any expense.
  6. Click More > Merge.
  7. Select the other expense from Step 3 > Continue.

Expected Result:

On detail selection page, Attendee section will be shown because both expenses have different attendees.

Actual Result:

On detail selection page, Attendee section is not shown when name is selected as attendees.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7034549_1766251363810.30.mp4

View all open jobs on GitHub

Activity

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

    @melvin-bot

    Triggered auto assignment to @bfitzexpensify (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. melvin-bot commented on Dec 20, 2025

    @melvin-bot

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

  4. melvin-bot commented on Dec 20, 2025

    @melvin-bot

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

  5. github-actions commented on Dec 20, 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. samranahm commented on Dec 20, 2025

    @samranahm
    Contributor

    Proposal

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

    Expense - Attendee section is missing when merging expenses when name is selected as attendee

    What is the root cause of that problem?

    In MergeTransactionUtils, the attendee comparison logic only compared login ?? email values

    When users selected attendees by name not email, the attendees can have:

    • Different or missing login values
    • Different or missing email values
    • But the same accountID (which uniquely identifies the person)

    This caused the comparison to incorrectly identify them as different attendees, preventing the Attendee section from showing during merge.

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

    We should update the comparison logic to use accountID as the primary identifier, with a fallback to login ?? email:

    if (field === 'attendees') {
    const getAttendeeIdentifier = (attendee: Attendee) => {
        if (attendee.accountID) {
            return `accountID:${attendee.accountID}`;
        }
        return attendee.login ?? attendee.email;
    };
    
    const targetAttendeeIdentifiers = ((targetValue as Attendee[] | undefined)?.map(getAttendeeIdentifier) ?? []).sort(localeCompare);
    const sourceAttendeeIdentifiers = ((sourceValue as Attendee[] | undefined)?.map(getAttendeeIdentifier) ?? []).sort(localeCompare);
    
    if (isTargetValueEmpty || isSourceValueEmpty || deepEqual(targetAttendeeIdentifiers, sourceAttendeeIdentifiers)) {

    here

    if (field === 'attendees') {
    const targetAttendeeLogins = ((targetValue as Attendee[] | undefined)?.map((attendee) => attendee.login ?? attendee.email) ?? []).sort(localeCompare);
    const sourceAttendeeLogins = ((sourceValue as Attendee[] | undefined)?.map((attendee) => attendee.login ?? attendee.email) ?? []).sort(localeCompare);
    if (isTargetValueEmpty || isSourceValueEmpty || deepEqual(targetAttendeeLogins, sourceAttendeeLogins)) {
    mergeableData[field] = isTargetValueEmpty ? sourceValue : targetValue;
    } else {
    conflictFields.push(field);
    }
    continue;
    }

    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.

  7. youssef-lr commented on Dec 20, 2025

    @youssef-lr
    Contributor

    We're reverting the offending PR.

  8. changed the title [-]Expense - Attendee section is missing when merging expenses when name is selected as attendee[/-] [+][Merge] Expense - Attendee section is missing when merging expenses when name is selected as attendee[/+] on Dec 20, 2025
  9. added and removed
    DeployBlockerCashThis issue or pull request should block deployment
    on Dec 20, 2025
  10. m-natarajan commented on Dec 21, 2025

    @m-natarajan

    Not repro, Windows 11 / Chrome, iPhone 13 / iOS 18.7.1, v9.2.85-1

    attendee.ios.MP4
    attendee.mp4
  11. melvin-bot commented on Jan 17, 2026

    @melvin-bot

    This issue has not been updated in over 15 days. @youssef-lr, @bfitzexpensify eroding to Monthly issue.

    P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

  12. melvin-bot commented on Mar 16, 2026

    @melvin-bot

    @youssef-lr, @bfitzexpensify, this Monthly task hasn't been acted upon in 6 weeks; closing.

    If you disagree, feel encouraged to reopen it -- but pick your least important issue to close instead.

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

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions