docs(timetable): close ART-OBSERVER-ADVANCE-AGGREGATE; wire event_id through createDraft

§17.3 footnote already accurately describes ArtistResolver::fromPortalToken
(checked at commit cc48011). 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 (commit 1716e09).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-08 22:23:43 +02:00
parent eba162f255
commit e26da4fb42
3 changed files with 16 additions and 25 deletions

View File

@@ -41,7 +41,13 @@ final class FormSubmissionService
) {}
/**
* @param array<string, mixed> $context opened_at / public_submitter_* / is_test / idempotency_key
* @param array<string, mixed> $context opened_at / public_submitter_* / is_test / idempotency_key / event_id
*
* `event_id` may be supplied for flows where the schema is org-owned (not
* event-owned) and the route has no `{event}` parameter for the
* FormSubmissionObserver fallback to pick up e.g. the artist-advance
* portal where the engagement is the source of truth per WS-4
* (ARCH-FORM-BUILDER §17.3 footnote).
*/
public function createDraft(FormSchema $schema, ?Model $subject, ?User $submitter, array $context = []): FormSubmission
{
@@ -62,6 +68,9 @@ final class FormSubmissionService
$submission->subject_type = $this->morphKeyFor($subject);
$submission->subject_id = (string) $subject->getKey();
}
if (isset($context['event_id']) && is_string($context['event_id']) && $context['event_id'] !== '') {
$submission->event_id = $context['event_id'];
}
$submission->submitted_by_user_id = $submitter?->id;
$submission->status = FormSubmissionStatus::DRAFT->value;
$submission->is_test = (bool) ($context['is_test'] ?? false);