Skip to content

[Due for payment 2026-05-13] [$250] Attendees are not copied in alphabetical order when they are arranged alphabetically #89130

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.64-0
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #87705
Email or phone of affected tester (no customers): sdsodijnosdjoij@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.2 / Chrome
App Component: Money Requests

Action Performed:

Precondition:

  • Enable Rules in workspace settings.
  • Enable Attendee tracking in 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 Attendees.
  6. Add "banana", then add "apple".
  7. Click Create expense.
  8. Create one more expense (no need add attendee).
  9. Open the report.
  10. Bulk select both expenses.
  11. Click dropdown button > Merge.
  12. Select the 3 attendees in Attendees section, then select any for other sections.
  13. Click Continue.
  14. On confirm page, hover over Attendees field and click Copy button.
  15. Close the RHP.
  16. Paste the content.

Expected Result:

Attendees will be copied in alphabetical order because they are arranged alphabetically on confirm page.

Actual Result:

Attendees are not copied in alphabetical order when they are arranged alphabetically on confirm page.
Copied attendees - banana, apple
Attendees on confirm page - apple, banana

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7140360_1777395157018.15.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022049223857914067097
  • Upwork Job ID: 2049223857914067097
  • Last Price Increase: 2026-04-28
Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

  1. melvin-bot commented on Apr 28, 2026

    @melvin-bot

    You have been assigned to this deploy blocker because you recently merged this PR: #87705

  2. melvin-bot commented on Apr 28, 2026

    @melvin-bot

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

  3. github-actions commented on Apr 28, 2026

    @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.
  4. OSBotify commented on Apr 28, 2026

    @OSBotify
    Contributor

    Investigation Summary

    Classification: Frontend bug
    Causing PR: #87705 - "feat: user pill workflow attendees" by @TaduJR (High confidence)
    Related Issues: #84985

    Recommendation: REVERT

    PR #87705 introduced the bug by applying sortAlphabetically() only to the visual UserPills display component, while leaving the attendeesCopyValue derived from the original unsorted actualAttendees array. Since the fix is non-trivial (requires ensuring the sort is applied consistently to both the display and copy paths) and the change is a UI enhancement rather than a critical bug fix, a revert is the safest path.

    Assigned: @TaduJR (PR author), @nyomanjyotisa and @Gonals (approving reviewers)
    Labels: DeployBlockerCash kept (frontend App PR caused the bug). DeployBlocker is not present and should not be added.

    Detailed Analysis

    Evidence

    Verification

    Affected file: src/components/ReportActionItem/MoneyRequestView.tsx

    PR #87705 modifies this file (confirmed via gh pr view 87705 --json files).

    The specific change that introduced the bug:

    • titleComponent now renders <UserPills users={sortAlphabetically(...)} /> — so the displayed pills are sorted.
    • But getAttendeesTitle (line 811) is still computed as:
      actualAttendees.map((item) => item?.displayName ?? item?.login).join(', ')
      
      without any sort applied.
    • attendeesCopyValue is derived directly from getAttendeesTitle, so the Copy button produces the original insertion order instead of the sorted alphabetical order shown on screen.

    The same pattern exists in AttendeeField.tsx (used on the confirmation page before submission), where the UserPills titleComponent also sorts via sortAlphabetically, but no sorted copy value is provided.

    Root Cause

    PR #87705 replaced the plain title prop (a comma-separated string) with a titleComponent rendering UserPills. The UserPills component sorts the attendees alphabetically for display. However, the copyValue prop passed to MenuItemWithTopDescription is sourced from attendeesCopyValue, which is built from the original unsorted actualAttendees array. The display order and the clipboard content are now computed from two different orderings, causing the mismatch.

  5. arosiclair commented on Apr 28, 2026

    @arosiclair
    Contributor

    This is super minor. Demoting

  6. 31 remaining items

  7. melvin-bot commented on May 6, 2026

    @melvin-bot

    @nyomanjyotisa 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]

  8. melvin-bot commented on May 12, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  9. nyomanjyotisa commented on May 13, 2026

    @nyomanjyotisa
    Member

    I don't think we should handle payment here, since we already discussed it in the original issue

  10. melvin-bot commented on May 13, 2026

    @melvin-bot

    Payment Summary

    Upwork Job

    BugZero Checklist (@mallenexpensify)

    • (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/2049223857914067097/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
  11. melvin-bot commented on May 18, 2026

    @melvin-bot

    @mallenexpensify Eep! 4 days overdue now. Issues have feelings too...

  12. melvin-bot commented on May 20, 2026

    @melvin-bot

    @mallenexpensify 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

  13. melvin-bot commented on May 22, 2026

    @melvin-bot

    @mallenexpensify 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it!

  14. mallenexpensify commented on May 22, 2026

    @mallenexpensify
    Contributor

    I don't think we should handle payment here, since we already discussed it in the #84985 (comment)

    Closing per the above.

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