mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 20:45:00 -05:00
A SHARED list (empty swimlaneId) renders under every swimlane. cardsCount() scoped the count by `list.swimlaneId`, which is '' for a shared list, so every swimlane showed the whole-list count while the cards rendered below were swimlane-scoped — e.g. "5 Cards" over an empty second swimlane. The card body already scopes by the container swimlane via listBody.jade `idOrNull ../../_id`; cardsCount() now takes that same `../../_id` (passed from listHeader.jade) and prefers it over the list's own binding, so the header count matches the cards actually rendered in that swimlane. Still gated to swimlanes view (lists view keeps the whole-list count), and both list.cards(id) and lazyListCardCount(id) already scope by the passed swimlane id (incl. first-swimlane shared/orphaned surfacing), so the count is correct in both eager and lazy (#6480) modes. tests/cardsCountSwimlaneScope.test.cjs guards the wiring; the per-swimlane card set is covered by server/lib/tests/selectAllSwimlane.tests.js. Thanks to xet7 !