Repository navigation
feat(import): quiet board import API for migration tools - #8673
Open
karlitschek wants to merge 4 commits into
Open
karlitschek wants to merge 4 commits into
karlitschek wants to merge 4 commits into
Conversation
2 of 6 tasks
karlitschek
force-pushed
the
feat/board-import-api
branch
from
November 3, 2026 12:03
8453354 to
d2537b2
Compare
karlitschek
marked this pull request as ready for review
November 3, 2026 12:06
karlitschek
force-pushed
the
feat/board-import-api
branch
3 times, most recently
from
November 3, 2026 19:45
f694833 to
78b25eb
Compare
An importing app that runs again, or follows changes in its source, must find the boards, stacks, labels, cards and shares it wrote before. deck_import_refs maps the app's own reference (by its SHA-256) to the Deck object, with the hash of what was last written, so later imports can tell whether somebody changed the object in Deck since. Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Frank Karlitschek <karlitschek@users.noreply.github.com>
occ deck:import creates a new board on every run and keeps no map from source IDs, so a migration can't run again, follow changes or verify what it wrote. IBoardImporter lets an app create boards with labels and stacks, write cards with their original creation, start, due and done times, assignments, labels and existing files as attachments, list, stat and soft-delete them and manage the board's shares, all keyed by its own references and safe to repeat. It writes through the mappers, so no activity, notification, mention or Deck event is created; full-text search, collaboration resources, share access, etags and the audit log are kept right through Deck's own listeners. Cards that were due before the import never announce themselves as overdue. A card somebody changed in Deck answers "changed" and keeps their version. Both sides hash a canonical form of each card (CardCanonicalForm) to verify it. Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Frank Karlitschek <karlitschek@users.noreply.github.com>
The quiet test imports and shares a plan with overdue, assigned and attached cards, runs the due and description cron jobs and counts the notification, activity, mail and comment tables, the activity and mail managers and Deck's events; a second test shows the same probes see Deck's normal services. The canonical form is pinned to hashes Go's encoding/json produces. Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Frank Karlitschek <karlitschek@users.noreply.github.com>
Sharing a file runs the server's share and mount listeners, and one of them recovers from a failed insert into the mount cache. On PostgreSQL that failure aborts the surrounding transaction, so every card with an attachment failed there. Cards, labels and assignments are now written in one transaction and attachments after it; until they are written the reference has no source hash, so a repeat completes the card instead of reporting a conflict. Files are checked before anything is written, and share and audit side effects run after commit as well. A repeated ensureBoard no longer bumps the board's change time, and board IDs beyond Deck's 32-bit IDs are not found instead of failing in the database. Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Frank Karlitschek <karlitschek@users.noreply.github.com>
karlitschek
force-pushed
the
feat/board-import-api
branch
from
November 3, 2026 22:20
78b25eb to
d84e54d
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an internal PHP API,
OCA\Deck\Import\IBoardImporter, and adeck_import_refstable, so migration tools can bring boards from other systems (for example task planners) into Deck:Tests: integration tests for idempotency and quietness (on SQLite, PostgreSQL and MySQL, with activity and notifications installed), and a canonical-form unit test.
This draft description was written with AI assistance (Claude Code) at the author's request; the author reviews it before the PR leaves draft.
TODO
Checklist
🤖 AI (if applicable)
This change was written with Claude Code (claude-opus-5-5) and is to be reviewed by the author before it leaves draft; every commit carries an
Assisted-bytrailer. Commits still need the author's sign-off (DCO).🤖 Generated with Claude Code