session_groups ECA model¶
Source: eca.eca.session_groups.yml
Purpose: Lifecycle reactions on session group entities — form prep and form-build alterations. Sibling of event_groups.
Events the model listens to¶
| Plugin | Label |
|---|---|
content_entity:prepareform |
Prepare session form |
form:form_build |
Build session form |
Entities & contexts touched¶
group(bundlesession)fedms_sessioncontent entity (indirectly, via the form events)
Why it exists¶
Session creation has stricter constraints than event creation:
- A session must live inside an event.
- Its date window must fit inside its parent event's
field_date. - Its assignees come from the parent event's membership pool.
This model wires those constraints into the form layer.
The membership-pool restriction itself is enforced server-side in
fedms_federation::EntityHooks::queryEntityReferenceAlter — but this
model makes sure the form renders the correct picker against
that restricted pool from the first paint.
Editing notes / gotchas¶
- Session creation is the most-tested part of the e2e suite.
Changes here often surface as failures in
tests/playwright/e2e/. Run smoke tests locally before pushing. - Keep this model symmetric with
event_groupsfor fields that exist on both bundles. Drift between the two is a common source of bugs. - Don't bypass the federation membership query alter to "fix" a picker — fix the alter or fix this model instead.
Related issues¶
fedms/support#61— Allow a session to sync/copy its members with the event.fedms/support#4— Can't create new session on an event (resolved).
See also¶
- event_groups — the parent-level analogue.
fedms_federation/src/Hook/EntityHooks.php::queryEntityReferenceAlter— the server-side restriction.