mirror of
https://github.com/wekan/wekan.git
synced 2026-11-08 11:25:19 -05:00
The board-open self-heal is broadened from the #6484 list-unbind alone to a shared repair set (models/lib/boardRepair.js planner + server/lib/repairBoardData.js): - #6484: lists wrongly bound to a swimlane -> cleared back to board-wide, so the list stops "disappearing" from the other swimlanes; - cards with no swimlaneId (null/''/missing), which never render in the Swimlanes view -> assigned to the board's first swimlane; - orphaned cards whose swimlaneId points at a DELETED swimlane (invisible cards) -> reassigned to the first swimlane. A card on an existing but archived swimlane is NOT treated as orphaned. The same repair set now runs in BOTH places: - Board open: boardBody.js maybeRepairBoard -> boardRepairNeeded / repairBoardData (server/methods/repairBoardData.js), once per board, admin-gated, fire-and-forget. - MongoDB <-> FerretDB v1 (SQLite) text migration: migrateTextDatabase runs repairAllBoards() on the live database BEFORE copying, so the migrated copy is clean too. It reports a new "repairing" phase (boardsDone/boardsTotal/repaired). Both flows drive ONE shared progress dashboard (migrationProgress), now: - mounted app-wide (defaultLayout) so it shows for an Admin Panel database migration as well as a board-open repair; - fed from the DB-migration status poll (attachments.js driveMigrationDashboard); - styled in WeKan blue (#2980b9) instead of the old purple/green; - branded with the configured Product name (from the earlier commit). Tests: tests/boardRepair.test.cjs (planner + server/migration/dashboard source guards, 11 checks) and the updated tests/listUnbindRepair.test.cjs pass. Thanks to xet7 !