When opening board, add missing lists.

Thanks to xet7 !

Fixes #5926
This commit is contained in:
Lauri Ojansivu 2025-10-20 17:06:42 +03:00
parent 9473c1fe41
commit 80777b4663
5 changed files with 331 additions and 30 deletions

View file

@ -803,13 +803,6 @@ Boards.helpers({
{
boardId: this._id,
archived: false,
// Get lists for all swimlanes in this board, plus lists without swimlaneId for backward compatibility
$or: [
{ swimlaneId: { $in: this.swimlanes().map(s => s._id) } },
{ swimlaneId: { $exists: false } },
{ swimlaneId: '' },
{ swimlaneId: null }
],
},
{ sort: sortKey },
);
@ -819,13 +812,6 @@ Boards.helpers({
return ReactiveCache.getLists(
{
boardId: this._id,
// Get lists for all swimlanes in this board, plus lists without swimlaneId for backward compatibility
$or: [
{ swimlaneId: { $in: this.swimlanes().map(s => s._id) } },
{ swimlaneId: { $exists: false } },
{ swimlaneId: '' },
{ swimlaneId: null }
]
},
{ sort: { sort: 1 } }
);

View file

@ -211,33 +211,20 @@ Swimlanes.helpers({
return this.draggableLists();
},
newestLists() {
// sorted lists from newest to the oldest, by its creation date or its cards' last modification date
// Include lists without swimlaneId for backward compatibility (they belong to default swimlane)
// Revert to shared lists across swimlanes: filter by board only
return ReactiveCache.getLists(
{
boardId: this.boardId,
$or: [
{ swimlaneId: this._id },
{ swimlaneId: { $exists: false } },
{ swimlaneId: '' },
{ swimlaneId: null }
],
archived: false,
},
{ sort: { modifiedAt: -1 } },
);
},
draggableLists() {
// Include lists without swimlaneId for backward compatibility (they belong to default swimlane)
// Revert to shared lists across swimlanes: filter by board only
return ReactiveCache.getLists(
{
boardId: this.boardId,
$or: [
{ swimlaneId: this._id },
{ swimlaneId: { $exists: false } },
{ swimlaneId: '' },
{ swimlaneId: null }
],
//archived: false,
},
{ sort: ['sort'] },
@ -245,7 +232,8 @@ Swimlanes.helpers({
},
myLists() {
return ReactiveCache.getLists({ swimlaneId: this._id });
// Revert to shared lists: provide lists by board for this swimlane's board
return ReactiveCache.getLists({ boardId: this.boardId });
},
allCards() {