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 // 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) { // if (needsMigration) {
// Start background migration for old boards // // Start background migration for old boards
this.isMigrating.set(true); // this.isMigrating.set(true);
await this.startBackgroundMigration(boardId); // await this.startBackgroundMigration(boardId);
this.isMigrating.set(false); // this.isMigrating.set(false);
} // }
// Check if board needs conversion (for old structure) // Check if board needs conversion (for old structure)
if (boardConverter.isBoardConverted(boardId)) { // DISABLED: Board conversion logic
if (process.env.DEBUG === 'true') { // if (boardConverter.isBoardConverted(boardId)) {
console.log(`Board ${boardId} has already been converted, skipping conversion`); // if (process.env.DEBUG === 'true') {
} // console.log(`Board ${boardId} has already been converted, skipping conversion`);
this.isBoardReady.set(true); // }
} else { // this.isBoardReady.set(true);
const needsConversion = boardConverter.needsConversion(boardId); // } else {
// const needsConversion = boardConverter.needsConversion(boardId);
if (needsConversion) { //
this.isConverting.set(true); // if (needsConversion) {
const success = await boardConverter.convertBoard(boardId); // this.isConverting.set(true);
this.isConverting.set(false); // const success = await boardConverter.convertBoard(boardId);
// this.isConverting.set(false);
if (success) { //
this.isBoardReady.set(true); // if (success) {
} else { // this.isBoardReady.set(true);
console.error('Board conversion failed, setting ready to true anyway'); // } else {
this.isBoardReady.set(true); // Still show board even if conversion failed // 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); // } 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 // 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) // 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 // 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 // Start attachment migration in background if needed
this.startAttachmentMigrationIfNeeded(boardId); // DISABLED: Attachment migration
// this.startAttachmentMigrationIfNeeded(boardId);
} catch (error) { } catch (error) {
console.error('Error during board conversion check:', error); console.error('Error during board conversion check:', error);
this.isConverting.set(false); this.isConverting.set(false);

View file

@ -378,9 +378,6 @@ body.list-resizing-active * {
position: relative; position: relative;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
}
.list-header .list-rotated {
} }
.list-header .list-header-watch-icon { .list-header .list-header-watch-icon {
padding-left: 10px; padding-left: 10px;

View file

@ -228,10 +228,8 @@ function initSortable(boardComponent, $listsDom) {
// Don't cancel the sortable when moving to a different swimlane // Don't cancel the sortable when moving to a different swimlane
// The DOM move should be allowed to complete // 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 { try {
Lists.update(list._id, { Lists.update(list._id, {
@ -682,6 +680,11 @@ Template.swimlane.helpers({
canSeeAddList() { canSeeAddList() {
return ReactiveCache.getCurrentUser().isBoardAdmin(); return ReactiveCache.getCurrentUser().isBoardAdmin();
}, },
lists() {
// Return per-swimlane lists for this swimlane
return this.myLists();
}
}); });
// Initialize sortable on DOM elements // Initialize sortable on DOM elements
@ -794,10 +797,8 @@ setTimeout(() => {
// Don't cancel the sortable when moving to a different swimlane // Don't cancel the sortable when moving to a different swimlane
// The DOM move should be allowed to complete // 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 { try {
Lists.update(list._id, { Lists.update(list._id, {
@ -938,10 +939,8 @@ setTimeout(() => {
// Don't cancel the sortable when moving to a different swimlane // Don't cancel the sortable when moving to a different swimlane
// The DOM move should be allowed to complete // 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 { try {
Lists.update(list._id, { Lists.update(list._id, {

View file

@ -232,8 +232,12 @@ Swimlanes.helpers({
}, },
myLists() { myLists() {
// Revert to shared lists: provide lists by board for this swimlane's board // Return per-swimlane lists: provide lists specific to this swimlane
return ReactiveCache.getLists({ boardId: this.boardId }); return ReactiveCache.getLists({
boardId: this.boardId,
swimlaneId: this._id,
archived: false
});
}, },
allCards() { allCards() {