From 034dc08269520ca31c780cce64e0150969e9228e Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Sat, 25 Oct 2025 19:17:09 +0300 Subject: [PATCH] Disabled migrations that happen when opening board. Defaulting to per-swimlane lists and drag drop list to same or different swimlane. Thanks to xet7 ! --- client/components/boards/boardBody.js | 77 +++++++++++++----------- client/components/lists/list.css | 3 - client/components/swimlanes/swimlanes.js | 17 +++--- models/swimlanes.js | 8 ++- 4 files changed, 57 insertions(+), 48 deletions(-) diff --git a/client/components/boards/boardBody.js b/client/components/boards/boardBody.js index 5eb317b9b..a9b04cddb 100644 --- a/client/components/boards/boardBody.js +++ b/client/components/boards/boardBody.js @@ -99,51 +99,60 @@ BlazeComponent.extendComponent({ } // Check if board needs migration based on migration version - const needsMigration = !board.migrationVersion || board.migrationVersion < 1; + // DISABLED: Migration check and execution + // const needsMigration = !board.migrationVersion || board.migrationVersion < 1; - if (needsMigration) { - // Start background migration for old boards - this.isMigrating.set(true); - await this.startBackgroundMigration(boardId); - this.isMigrating.set(false); - } + // if (needsMigration) { + // // Start background migration for old boards + // this.isMigrating.set(true); + // await this.startBackgroundMigration(boardId); + // this.isMigrating.set(false); + // } // Check if board needs conversion (for old structure) - if (boardConverter.isBoardConverted(boardId)) { - if (process.env.DEBUG === 'true') { - console.log(`Board ${boardId} has already been converted, skipping conversion`); - } - this.isBoardReady.set(true); - } else { - const needsConversion = boardConverter.needsConversion(boardId); - - if (needsConversion) { - this.isConverting.set(true); - const success = await boardConverter.convertBoard(boardId); - this.isConverting.set(false); - - if (success) { - this.isBoardReady.set(true); - } else { - console.error('Board conversion failed, setting ready to true anyway'); - this.isBoardReady.set(true); // Still show board even if conversion failed - } - } else { - this.isBoardReady.set(true); - } - } + // DISABLED: Board conversion logic + // if (boardConverter.isBoardConverted(boardId)) { + // if (process.env.DEBUG === 'true') { + // console.log(`Board ${boardId} has already been converted, skipping conversion`); + // } + // this.isBoardReady.set(true); + // } else { + // const needsConversion = boardConverter.needsConversion(boardId); + // + // if (needsConversion) { + // this.isConverting.set(true); + // const success = await boardConverter.convertBoard(boardId); + // this.isConverting.set(false); + // + // if (success) { + // this.isBoardReady.set(true); + // } else { + // console.error('Board conversion failed, setting ready to true anyway'); + // this.isBoardReady.set(true); // Still show board even if conversion failed + // } + // } else { + // this.isBoardReady.set(true); + // } + // } + + // Set board ready immediately since conversions are disabled + this.isBoardReady.set(true); // Convert shared lists to per-swimlane lists if needed - await this.convertSharedListsToPerSwimlane(boardId); + // DISABLED: Shared lists conversion + // await this.convertSharedListsToPerSwimlane(boardId); // Fix missing lists migration (for cards with wrong listId references) - await this.fixMissingLists(boardId); + // DISABLED: Missing lists fix + // await this.fixMissingLists(boardId); // Fix duplicate lists created by WeKan 8.10 - await this.fixDuplicateLists(boardId); + // DISABLED: Duplicate lists fix + // await this.fixDuplicateLists(boardId); // Start attachment migration in background if needed - this.startAttachmentMigrationIfNeeded(boardId); + // DISABLED: Attachment migration + // this.startAttachmentMigrationIfNeeded(boardId); } catch (error) { console.error('Error during board conversion check:', error); this.isConverting.set(false); diff --git a/client/components/lists/list.css b/client/components/lists/list.css index 7c238efcd..53426199b 100644 --- a/client/components/lists/list.css +++ b/client/components/lists/list.css @@ -378,9 +378,6 @@ body.list-resizing-active * { position: relative; text-overflow: ellipsis; white-space: nowrap; -} -.list-header .list-rotated { - } .list-header .list-header-watch-icon { padding-left: 10px; diff --git a/client/components/swimlanes/swimlanes.js b/client/components/swimlanes/swimlanes.js index 47b9c5843..e0dd896d5 100644 --- a/client/components/swimlanes/swimlanes.js +++ b/client/components/swimlanes/swimlanes.js @@ -228,10 +228,8 @@ function initSortable(boardComponent, $listsDom) { // Don't cancel the sortable when moving to a different swimlane // The DOM move should be allowed to complete - } else { - // If staying in the same swimlane, cancel the sortable to prevent DOM manipulation issues - $listsDom.sortable('cancel'); } + // Allow reordering within the same swimlane by not canceling the sortable try { Lists.update(list._id, { @@ -682,6 +680,11 @@ Template.swimlane.helpers({ canSeeAddList() { return ReactiveCache.getCurrentUser().isBoardAdmin(); }, + + lists() { + // Return per-swimlane lists for this swimlane + return this.myLists(); + } }); // Initialize sortable on DOM elements @@ -794,10 +797,8 @@ setTimeout(() => { // Don't cancel the sortable when moving to a different swimlane // The DOM move should be allowed to complete - } else { - // If staying in the same swimlane, cancel the sortable to prevent DOM manipulation issues - $swimlane.sortable('cancel'); } + // Allow reordering within the same swimlane by not canceling the sortable try { Lists.update(list._id, { @@ -938,10 +939,8 @@ setTimeout(() => { // Don't cancel the sortable when moving to a different swimlane // The DOM move should be allowed to complete - } else { - // If staying in the same swimlane, cancel the sortable to prevent DOM manipulation issues - $listsGroup.sortable('cancel'); } + // Allow reordering within the same swimlane by not canceling the sortable try { Lists.update(list._id, { diff --git a/models/swimlanes.js b/models/swimlanes.js index 012e56f21..659111d04 100644 --- a/models/swimlanes.js +++ b/models/swimlanes.js @@ -232,8 +232,12 @@ Swimlanes.helpers({ }, myLists() { - // Revert to shared lists: provide lists by board for this swimlane's board - return ReactiveCache.getLists({ boardId: this.boardId }); + // Return per-swimlane lists: provide lists specific to this swimlane + return ReactiveCache.getLists({ + boardId: this.boardId, + swimlaneId: this._id, + archived: false + }); }, allCards() {