Skip to content

Manager reset-selected endpoint to restore chapter assignments to not_started (Maestro fixture baseline) #464

Closed

Description

@mattrace-gloo

Summary

Add a manager-only endpoint that restores selected chapter assignments to not_started so Maestro ownership fixtures can reclaim burned claim chapters without rotating to a new chapter or wiping the fixture project.

Unblocks eten-tech-foundation/fluent-mobile#607 (claim baseline restore). Conflict and open Peer Check seeds for that ticket use existing endpoints and do not need this change.

Proposed contract

PATCH /projects/{projectId}/chapter-assignments/reset-selected

Body: { chapterAssignmentIds: int[] }

For each listed chapter:

  • set status to not_started
  • set assignedUserId and peerCheckerId to null
  • set submittedTime to null
  • write status/assignment history (recordStatusChange)

Scope:

  • Middleware matches assign-selected: CONTENT_ASSIGN + project UPDATE
  • Only chapters currently in draft or peer_check may be reset
  • Any other status returns 409
  • Ids not in the project return 404
  • Reuse MAX_CHAPTER_ASSIGNMENTS_PER_REQUEST and the assign-selected error shape

Acceptance criteria

  • Manager can reset draft and peer_check chapters to not_started and unassigned
  • Non-manager receives 403
  • Chapters past peer_check (or any other status) receive 409
  • Ids outside the project receive 404
  • Status history is written
  • A reset chapter can be claimed again
  • docs/permissions.md documents the new policy

Implementation notes

Reuse updateChapterAssignment(..., tx) so FA-R6 history is written. Widen UpdateChapterAssignmentRequestData.submittedTime to Date | null (FA-R9). Add resetStatus on chapter-assignments.policy.ts.

Links

  • fluent-mobile #607

Activity

  1. added 4 commits that reference this issue on Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ready-for-agentFully specified, ready for an AFK agent

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions