Filter drop-downs hide categories with zero records, confusing users; always display full list

Created on 2 July 2025, 14 days ago

Problem / Motivation

On the Entity Mesh table the Category and Sub-category filter widgets are populated dynamically by querying the data table for distinct values.

When no rows exist for a given value (e.g. no โ€œBroken linksโ€ records have been logged yet) that value never appears in the drop-down. Users therefore assume the feature behind the missing option is not implemented or is malfunctioning.

Steps to reproduce

- Install/enable the module and ensure the data table is empty for at least one known category (e.g. broken links).
- Visit admin/reports/entity-mesh/table.
- Open the Category (and Sub-category) select element.
- Observe that categories with zero matching rows are absent; there is no way to filter for them.

Expected: All supported categories are always listed, even if the current count is zero.
Actual: Categories with a zero count are omitted, causing confusion.

Proposed resolution

- Populate from a canonical source
- Build the options array from a static definition (config schema, plugin annotation, or hook_options_list()), not from the live table.
- Show zero-count states gracefully

Remaining tasks

- Decide the authoritative source of the category/sub-category list (config vs. code).
- Refactor the form builder to load from that source.
- Create an upgrade path if a new config item is introduced.
- Code review & merge request.

โœจ Feature request
Status

Active

Version

1.0

Component

Code

Created by

๐Ÿ‡ช๐Ÿ‡ธSpain lpeidro Madrid

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024