8000 Board filter by an unused label shows every card · Issue #837 · kanbn/kan · GitHub
[go: up one dir, main page]

Skip to content

Board filter by an unused label shows every card #837

Backlog

Description

@simplyBarbe

🐛 Bug Report

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

  1. Create a label "Video" on a board and don't put it on any card.
  2. Open the board filters and select the label "Video".
  3. 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

  1. added
    bug
    on Dec 4, 2026
  2. changed the title [-](bug): board filter by an unused label shows every card[/-] [+]Board filter by an unused label shows every card[/+] on Dec 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0