Fixes 26509: Entity Reference custom property filters return no results in Advanced Search - #33253
Fixes 26509: Entity Reference custom property filters return no results in Advanced Search#33253anuj-kumary wants to merge 2 commits into
Conversation
Advanced Search filters built on an Entity Reference custom property never matched anything. Two independent causes: - The filter looked the chosen value up against a different part of the reference than the one the UI offers, so the comparison only ever succeeded when those two happened to be the same string. - The values offered in the picker are lower-cased at source, while the index preserves the original capitalisation, and the comparison was case-sensitive. Any reference not already entirely lower-case could never be matched. The filter now reads the part of the reference the UI is showing and compares it ignoring case. Reloading a saved filter was updated to match, so existing saved queries still open correctly.
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
|
✅ Playwright Results — workflow succeededValidated commit ✅ 4496 passed · ❌ 0 failed · 🟡 10 flaky · ⏭️ 1 skipped · 🧰 0 lifecycle flaky PerformanceBlocking targets: ✅ met · Optimization targets: 🟡 in progress Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting. 🕒 Full workflow signal wall (to summary) 51m 36s ⏱️ Max setup 5m 18s · max shard execution 20m 9s · max shard-job elapsed before upload 23m 12s · reporting 24s 🌐 217.92 requests/attempt · 2.24 app boots/UI scenario · 39.77% common-shard skew Optimization targets still in progress:
🟡 10 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |



Describe your changes:
Advanced Search filters built on an Entity Reference custom property never returned results — the asset was indexed, the property was populated, and the filter still came back empty every time.
There were two independent causes. Either one on its own was enough to break the filter, which is why fixing only the first did not make the symptom go away.
1. The filter and the search index disagreed about where the value lives.
When a custom property holds a reference to another entity, the index stores the reference's parts separately — its name, its fully qualified name and its display name each land in a different place. The query builder shows the display name in the UI and offers display names in the value picker, but always looked the chosen value up against the name. Those two are only the same string by coincidence, so the comparison failed for any reference where they differ.
2. The offered values and the stored values differ in letter case.
The value picker is populated from a source that lower-cases everything it returns, while the index preserves the original capitalisation. The comparison was exact and case-sensitive, so a reference whose display name was not already entirely lower-case could never be matched — including the one the user had just selected from the list.
The fix
The filter now reads the same part of the reference that the UI is displaying, and compares it ignoring case. Reloading a previously saved filter was updated to stay in step with the new query shape, so saved queries still open correctly in the builder.
No backend or schema changes; this is entirely in the search-filter layer.
Type of change:
High-level design:
N/A — small change.
Tests:
Use cases covered
Unit tests
Backend integration tests
Ingestion integration tests
Playwright (UI) tests
Manual testing performed
UI screen recording / screenshots:
To be attached.
Checklist:
I have read the CONTRIBUTING document.
My PR title is
Fixes <issue-number>: <short explanation>My PR is linked to a GitHub issue via
Fixes #<issue-number>above.I have commented on my code, particularly in hard-to-understand areas.
For JSON Schema changes: not applicable.
For UI changes: I attached a screen recording and/or screenshots above.
I have added tests and listed them above.
I have added a test that covers the exact scenario we are fixing.