Skip to content

feat: Admin APIs for manual mentor assignment and confirming no match found #549

@womencodingcommunity

Description

@womencodingcommunity

Context

Once a mentee is in PENDING_MANUAL_MATCH, admins have two options:

  1. Manually assign a mentor — admin finds a suitable mentor outside the original priority list and creates a new application
  2. Confirm no match found — after exhausting all manual options, admin marks the mentee as unmatched for this cycle

Changes Required

MenteeWorkflowService

  • Add assignMentor(menteeId, cycleId, mentorId, notes):
    • Validates mentor exists and has capacity
    • Closes the PENDING_MANUAL_MATCH placeholder application
    • Creates a new MenteeApplication for the mentee→mentor pairing with status PENDING
    • Normal acceptance flow continues from there
  • Add confirmNoMatch(menteeId, cycleId, reason):
    • Sets NO_MATCH_FOUND on the PENDING_MANUAL_MATCH placeholder application
    • Terminal — no further actions possible for this mentee in this cycle

New API endpoints

POST /api/platform/v1/mentees/{menteeId}/cycles/{cycleId}/assign-mentor
Body: { "mentorId": number, "notes": "string" }
Response: Newly created MenteeApplication

POST /api/platform/v1/mentees/{menteeId}/cycles/{cycleId}/no-match
Body: { "reason": "string" }
Response: Updated MenteeApplication

Acceptance Criteria

  • assignMentor() creates new application and closes placeholder
  • Mentor capacity validated before assignment
  • confirmNoMatch() sets NO_MATCH_FOUND and is terminal
  • Both endpoints require admin permission and documented in OpenAPI/Swagger
  • Unit and integration tests

Dependencies

  • Ticket: feat: Auto-detect exhausted priorities and transition to PENDING_MANUAL_MATCH

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestepic-mentorshipAll tasks related to mentorship pages & tasksjava/springbootTasks where is needed Java experience or Spring Boot Experience

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions