Skip to content

feat [IEG-3091]: implement department suspension api for opportunities#317

Merged
mstocchimonk merged 5 commits into
mainfrom
feat/IEG-3091-department-suspension
Jul 21, 2026
Merged

feat [IEG-3091]: implement department suspension api for opportunities#317
mstocchimonk merged 5 commits into
mainfrom
feat/IEG-3091-department-suspension

Conversation

@mstocchimonk

@mstocchimonk mstocchimonk commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Implement the department-facing suspension API for partner opportunities

  • add PATCH /opportunities/{opportunityId}/suspension/schedule
  • suspendFrom <= today → immediate: status → 'suspended'; suspendFrom > today → scheduled (suspend_from persisted, applied by the existing cron)
  • suspensionMessage + suspendFrom required; suspended_by = 'department'
  • override: a pending operator-scheduled suspension does not block the department — an immediate suspension absorbs it, a new date overwrites it (product decision)
  • add PATCH /opportunities/{opportunityId}/suspension/cancel (admin), returns 204 — absolute: cancels department- and operator-scheduled suspensions alike; 412 if none pending
  • restrict the operator cancel to its own schedules: 412 on a department-scheduled suspension

Resolves IEG-3091

@mstocchimonk
mstocchimonk force-pushed the feat/IEG-3091-department-suspension branch from 99d5857 to 7741898 Compare July 20, 2026 15:17
@mstocchimonk
mstocchimonk marked this pull request as ready for review July 20, 2026 15:20
@mstocchimonk
mstocchimonk requested a review from a team as a code owner July 20, 2026 15:20
Base automatically changed from feat/IEG-2721-operator-suspension to main July 21, 2026 08:20
- add PATCH /opportunities/{id}/suspend (department): immediate
  (suspendFrom <= today) or scheduled (suspendFrom > today);
  suspensionMessage + suspendFrom required; suspended_by_type='department'
- add PATCH /opportunities/{id}/suspend/cancel (department):
  cancels department and operator-scheduled suspensions alike
- restrict the operator cancel to its own schedules: 412 on a
  department-scheduled suspension
@mstocchimonk
mstocchimonk force-pushed the feat/IEG-3091-department-suspension branch from 7741898 to 5b854be Compare July 21, 2026 08:24
@mstocchimonk
mstocchimonk force-pushed the feat/IEG-3091-department-suspension branch from 318f4b9 to d8f6c0a Compare July 21, 2026 09:32
@mstocchimonk
mstocchimonk merged commit 3b78198 into main Jul 21, 2026
4 checks passed
@mstocchimonk
mstocchimonk deleted the feat/IEG-3091-department-suspension branch July 21, 2026 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants