Преглед на файлове

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

Thanks to xet7 !
Lauri Ojansivu преди 4 дни
родител
ревизия
034dc08269
променени са 4 файла, в които са добавени 57 реда и са изтрити 48 реда
  1. 43 34
      client/components/boards/boardBody.js
  2. 0 3
      client/components/lists/list.css
  3. 8 9
      client/components/swimlanes/swimlanes.js
  4. 6 2
      models/swimlanes.js

+ 43 - 34
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);

+ 0 - 3
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;

+ 8 - 9
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, {

+ 6 - 2
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() {