Commit Graph
5 Commits
Author SHA1 Message Date
Lauri Ojansivu ef54907836 Import Scrum planning into an existing board.
Every Scrum import used to create a new board. A board administrator can
now import a native wekan-scrum-2 transfer, or a WeKan board export, into
a board that already exists, from the Sprints view: Preview shows what
would change and writes nothing, Import writes it.

Sprints and releases are matched by ID on this board, then by
provenance, then by a name exactly one record has on each side; the rest
are created once with the source's provenance, so importing the same
file again changes nothing. Cards are matched by ID, or by card number
and title, and never created; unmatched, ambiguous and other boards'
cards are reported and left alone. Matched cards get the file's sprint,
releases, backlog rank, issue type and acceptance criteria; a move into a
finished sprint is refused. The writes go through the journaled Scrum
import stage, so an interrupted import is finished or discarded the same
way, and are recorded as one Scrum History change.

Thanks to xet7 !
2026-10-08 12:36:57 +03:00
Lauri Ojansivu b6ca287df3 Keep sprint snapshot rows outside the sprint document.
A sprint's start and close snapshots kept one row per card inside the
sprint document, so a sprint over about 15,000 cards could not be closed.
The rows now go to their own collection, scrumSnapshotRows, in immutable
chunks of 2,000 named by sprint, kind, snapshot time and chunk number, so a
retried start or close, an undo or a redo finds the same rows. The sprint
keeps a header and the report's totals, computed from all rows.

The board data computes each sprint's report on the server and sends only
snapshot headers: from the stored totals, or for an assigned-only reader
from the rows they may see. The scope replay, the transfer export and the
board copy read the rows from wherever they are kept; the transfer import
writes them back as chunks through the import journal. Snapshots stored
inline before this keep working.

Thanks to xet7 !
2026-10-03 00:38:38 +03:00
Lauri Ojansivu 6f52f2b42a Let a board admin finish or discard an interrupted Scrum import online.
An interrupted Scrum import could only be continued by the offline
recovery command, with every writer stopped, because nothing told a
crashed import from a paused one. The import's checkpoint now names its
writer and carries a lease the writer renews at each step. Once the
lease runs out, a board administrator can finish the import from the
Scrum view: the recovery takes the checkpoint over by compare-and-set
and replays the saved steps. A writer that was only paused is fenced out
at its next checkpoint update, and the steps are idempotent. An import
whose plan was never fully saved can be discarded, which writes nothing
to the board. Its contents cannot be rebuilt, because the source file is
not kept. Rollback stays offline. Checkpoints from before this change
are taken over at once, since their writer did not survive a restart.

Thanks to xet7 !
2026-10-02 21:02:28 +03:00
Lauri Ojansivu bde8c3010f Rollback interrupted Scrum imports during offline maintenance
Validate complete plans before undoing stored writes in reverse order. Restore only original Scrum metadata and conditionally remove exact imported planning records. Persist reverse progress and cleanup, retain recovery claims on failure, and safely discard incomplete preparation without destination writes.

MongoDB integration tests cover every planned collection, write gaps, changed targets, cleanup interruption, corrupted cursors and the CLI. FerretDB remains unverified.

Thanks to xet7 !
2026-09-27 23:12:28 +03:00
Lauri Ojansivu 3b2bb23356 Resume stored Scrum import plans through explicit offline maintenance
Validate every target before writing, preserve stable IDs and conditional updates, and retain non-expiring recovery claims on failure. Resume complete staging and interrupted cleanup; reject partial plans and changed targets. Online recovery and other board-import stages remain unfinished.
2026-09-27 23:02:47 +03:00