You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. <
8000
a class="Link--inTextBlock" href="">Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Board filter by an unused label shows every card #837
Describe the bug
When a board is filtered by a label that exists but is on no card, the label filter is dropped and the board shows all cards (or all cards matching the other filters). Filtering by "label X" should return no cards when no card has label X.
The repository pre-selects card IDs by label, then applies cardIds.length > 0 ? inArray(cards.publicId, cardIds) : undefined, so an empty pre-selection reads as "no filter". This happens in both getByPublicId and getBySlug (packages/db/src/repository/board.repo.ts, around lines 415 and 717).
To Reproduce
Create a label "Video" on a board and don't put it on any card.
Open the board filters and select the label "Video".
All cards are still shown.
Expected behavior
No cards are shown. "Filter requested with no matches" and "no filter requested" should be different states, also when combined with other filters (members, due date).
Additional context
Found while working on card priority (#252, PR #836). It also matters for the advanced filter builder I'm proposing in a separate feature request: "no matches" must stay different from "no filter" there too.
Activity
[-](bug): board filter by an unused label shows every card[/-][+]Board filter by an unused label shows every card[/+]