Refactor sync_board to discover plans from notes, not board items #208
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo_admin/pal-e-api#208
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Feature
Lineage
Standalone — board-pal-e-docs kanban unification. Blocks: #203 (remove plan items from boards)
Repo
forgejo_admin/pal-e-docsUser Story
As the platform
I want sync_board to discover plan→phase relationships from notes hierarchy
So that plan items can be removed from boards without breaking phase sync
Context
POST /boards/{slug}/synccurrently finds phases by: query plan-type board items → get note_slug → find child phase notes → create/update phase board items. If plan items are removed from boards (#203), sync returns 0/0/0 silently.The fix: query plan notes directly from the project (
notes where note_type="plan" and project_id=board.project_id) instead of from plan board items. Plan notes still exist in the database — they're just not on the board anymore.File Targets
Files to modify:
src/pal_e_docs/routes/boards.py— refactor sync endpoint (~line 251) to query plan notes from project instead of plan board itemsFiles NOT to touch:
Acceptance Criteria
Test Expectations
pytest tests/test_boards.py -vConstraints
SELECT notes WHERE note_type='plan' AND project_id=board.project_idChecklist
Related
convention-kanban-over-plans— the philosophy driving this changeTicket Review Verdict: READY
Reviewed by agent (review-327-2026-03-24). All 11 template sections present. File targets verified — sync_board function at line 323 (not ~251 as stated). Dependencies correct (#203 blocked by this). Existing test suite at tests/test_board_sync.py has 11 tests — new tests needed for "no plan board item" path.
One nit: line reference correction (323, not 251). Non-blocking.
Ready for next_up → dispatch.