Disabled migrations that happen when opening board. Defaulting to per-swimlane lists and drag drop list to same or different swimlane.

Thanks to xet7 !
This commit is contained in:
Lauri Ojansivu 2025-10-25 19:17:09 +03:00
parent d1a51b42f6
commit 034dc08269
4 changed files with 57 additions and 48 deletions

View file

@ -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);
// 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);
// }
// }
if (needsConversion) {
this.isConverting.set(true);
const success = await boardConverter.convertBoard(boardId);
this.isConverting.set(false);
if (success) {
// Set board ready immediately since conversions are disabled
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);
}
}
// 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);

View file

@ -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;

View file

@ -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, {

View file

@ -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() {