U02: merge students who are in the same course (D259); 0.21.0-rc.2 #290

Merged
oliver.maklott merged 2 commits from u02-merge-students into main 2026-10-12 22:52:39 +00:00

U02 (Rückmeldung U, D259): merging two persons who are one student also works when both are in the same course.

  • Everything of the merged person goes to the kept one (apps/api/src/students/merge.ts): enrollments, attempts with all their results, level unlocks, game unlocks (rounds left add up), game runs, bot submissions, limits, poll votes and lesson tracks (the kept person's win), class games and dimmed devices name the kept enrollment.
  • A level both worked on keeps all rounds: the merged person's first (earlier tries), the kept person's newest stays the one that continues.
  • Messages: moved where only the merged person wrote; where both wrote in a course, the request says per course keep, merge or both (by time), else students.merge-messages-choice. Previously they were lost with the merged person.
  • Store collections both have: the merged person's entries are numbered after the kept ones (was refused).
  • dryRun: per course who is in it, challenges both worked on, messages on each side; nothing changes.
  • Error ids students.merge-same-course / merge-store-conflict replaced; texts for the CLI (U03) in the catalog.
  • Tests: same course with rounds, unlocks, messages, class game, store; message choices per course. Full API suite green (613).
  • 0.21.0-rc.2, D259, SPEC part S, MIGRATION_NOTES.

🤖 Generated with Claude Code

U02 (Rückmeldung U, D259): merging two persons who are one student also works when both are in the same course. - [x] Everything of the merged person goes to the kept one (`apps/api/src/students/merge.ts`): enrollments, attempts with all their results, level unlocks, game unlocks (rounds left add up), game runs, bot submissions, limits, poll votes and lesson tracks (the kept person's win), class games and dimmed devices name the kept enrollment. - [x] A level both worked on keeps all rounds: the merged person's first (earlier tries), the kept person's newest stays the one that continues. - [x] Messages: moved where only the merged person wrote; where both wrote in a course, the request says per course `keep`, `merge` or `both` (by time), else `students.merge-messages-choice`. Previously they were lost with the merged person. - [x] Store collections both have: the merged person's entries are numbered after the kept ones (was refused). - [x] `dryRun`: per course who is in it, challenges both worked on, messages on each side; nothing changes. - [x] Error ids `students.merge-same-course` / `merge-store-conflict` replaced; texts for the CLI (U03) in the catalog. - [x] Tests: same course with rounds, unlocks, messages, class game, store; message choices per course. Full API suite green (613). - [x] 0.21.0-rc.2, D259, SPEC part S, MIGRATION_NOTES. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Schema examples for the merge's dry run and message choices
All checks were successful
check / check (pull_request) Successful in 6m47s
e2e / e2e (pull_request) Successful in 15m39s
publish / release (push) Successful in 1m54s
check / check (push) Successful in 7m7s
e2e / e2e (push) Successful in 14m46s
48cb8fa37b
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
aivopod/aivopod-app!290
No description provided.