docs(timetable): close ART-OBSERVER-ADVANCE-AGGREGATE; wire event_id through createDraft
§17.3 footnote already accurately describes ArtistResolver::fromPortalToken (checked at commitcc48011). Wired event_id end-to-end on the cleaner path: FormSubmissionService::createDraft now accepts event_id via the \$context bag, and the EngagementPortalController passes it from \$resolved->eventId. Replaces the prior post-save fallback. Per WS-4 denormalisation requirement. ART-OBSERVER-ADVANCE-AGGREGATE moved from open to closed — landed in Session 3 as the AdvanceSectionObserver (commit1716e09). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -254,23 +254,17 @@ final class EngagementPortalController extends Controller
|
||||
return $existing;
|
||||
}
|
||||
|
||||
// Pre-set event_id so the FormSubmissionObserver doesn't fall back
|
||||
// to the route('event') lookup (this portal route has no {event}
|
||||
// parameter — the engagement is the source of truth per WS-4).
|
||||
$submission = $this->submissionService->createDraft(
|
||||
// Pass event_id via the context bag — the schema is org-owned (not
|
||||
// event-owned) and this route has no {event} parameter for the
|
||||
// FormSubmissionObserver fallback. ARCH-FORM-BUILDER §17.3 footnote.
|
||||
return $this->submissionService->createDraft(
|
||||
schema: $schema,
|
||||
subject: $resolved->subject,
|
||||
submitter: null,
|
||||
context: [
|
||||
'idempotency_key' => 'artist_advance:'.$resolved->engagement->id,
|
||||
'event_id' => $resolved->eventId,
|
||||
],
|
||||
);
|
||||
|
||||
if ($submission->event_id === null) {
|
||||
$submission->event_id = $resolved->eventId;
|
||||
$submission->save();
|
||||
}
|
||||
|
||||
return $submission->refresh();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user