[CP Staging] Revert "Fix filtering attendees names in the Reports page"#80207
[CP Staging] Revert "Fix filtering attendees names in the Reports page"#80207
Reports page"#80207Conversation
Reports page"Reports page"
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9cd909b9fa
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| filterKey === CONST.SEARCH.SYNTAX_FILTER_KEYS.EXPORTER || | ||
| filterKey === CONST.SEARCH.SYNTAX_FILTER_KEYS.ATTENDEE | ||
| ) { | ||
| filtersForm[key as typeof filterKey] = filterValues.filter((id) => personalDetails?.[id]); |
There was a problem hiding this comment.
Preserve name-only attendee filters when parsing search
This now filters ATTENDEE values through personalDetails, so any attendee filter values that don’t map to a known account (e.g., name-only attendees without accountIDs) are silently dropped in buildFilterFormValuesFromQuery. That means saved URLs or filters like attendee:Bob no longer apply and return broader results than requested. Consider keeping ATTENDEE values that aren’t in personalDetails, or restoring the previous special‑case handling for name‑only attendees.
Useful? React with 👍 / 👎.
| value: lodashUnionBy( | ||
| transactionChanges.attendees?.map(({avatarUrl, displayName, email}) => ({avatarUrl, displayName, email})), | ||
| recentAttendees, | ||
| (attendee) => attendee.email || attendee.displayName, | ||
| 'email', | ||
| ).slice(0, CONST.IOU.MAX_RECENT_REPORTS_TO_SHOW), |
There was a problem hiding this comment.
Avoid collapsing name-only attendees in recent list
Recent attendees are now deduped by email only. Name‑only attendees often have an empty email, so multiple distinct name‑only attendees collapse to a single entry in NVP_RECENT_ATTENDEES. After adding different name‑only attendees, only the first survives and others never appear in the recent list/suggestions. Consider using a key that falls back to displayName when email is empty (as before) to keep unique name‑only entries.
Useful? React with 👍 / 👎.
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
|
@lakchote looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
|
Not an emergency, straight revert. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
…ndees-search [CP Staging] Revert "Fix filtering attendees names in the `Reports` page" (cherry picked from commit ad0d695) (cherry-picked to staging by lakchote)
|
🚀 Cherry-picked to staging by https://github.com/lakchote in version: 9.3.6-1 🚀
|
|
🚀 Deployed to production by https://github.com/Beamanator in version: 9.3.6-4 🚀
|
|
🚀 Cherry-picked to staging by https://github.com/lakchote in version: 9.3.7-0 🚀
|
|
🚀 Deployed to production by https://github.com/Beamanator in version: 9.3.7-3 🚀
|
Reverts #79498 to fix deploy blocker #80175