mirror of
https://github.com/wekan/wekan.git
synced 2026-02-28 19:00:17 +01:00
Merge branch 'main' into feature/reactive-cache-async-migration
This commit is contained in:
commit
5212f3beb3
328 changed files with 15124 additions and 3392 deletions
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* Delete Duplicate Empty Lists Migration
|
||||
*
|
||||
*
|
||||
* Safely deletes empty duplicate lists from a board:
|
||||
* 1. First converts any shared lists to per-swimlane lists
|
||||
* 2. Only deletes per-swimlane lists that:
|
||||
|
|
@ -42,9 +42,9 @@ class DeleteDuplicateEmptyListsMigration {
|
|||
const listCards = cards.filter(card => card.listId === list._id);
|
||||
if (listCards.length === 0) {
|
||||
// Check if there's a duplicate list with the same title that has cards
|
||||
const duplicateListsWithSameTitle = lists.filter(l =>
|
||||
l._id !== list._id &&
|
||||
l.title === list.title &&
|
||||
const duplicateListsWithSameTitle = lists.filter(l =>
|
||||
l._id !== list._id &&
|
||||
l.title === list.title &&
|
||||
l.boardId === boardId
|
||||
);
|
||||
|
||||
|
|
@ -137,8 +137,8 @@ class DeleteDuplicateEmptyListsMigration {
|
|||
|
||||
if (swimlaneCards.length > 0) {
|
||||
// Check if per-swimlane list already exists
|
||||
const existingList = lists.find(l =>
|
||||
l.title === sharedList.title &&
|
||||
const existingList = lists.find(l =>
|
||||
l.title === sharedList.title &&
|
||||
l.swimlaneId === swimlane._id &&
|
||||
l._id !== sharedList._id
|
||||
);
|
||||
|
|
@ -230,9 +230,9 @@ class DeleteDuplicateEmptyListsMigration {
|
|||
}
|
||||
|
||||
// Safety check 3: There must be another list with the same title on the same board that has cards
|
||||
const duplicateListsWithSameTitle = lists.filter(l =>
|
||||
l._id !== list._id &&
|
||||
l.title === list.title &&
|
||||
const duplicateListsWithSameTitle = lists.filter(l =>
|
||||
l._id !== list._id &&
|
||||
l.title === list.title &&
|
||||
l.boardId === boardId
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue