Skip to content

feat(events): a new meeting holds a part once, with a row per room - #701

Merged
mindsers merged 2 commits into
mainfrom
feat/rooms-r4-7-creation-rows
Nov 28, 2026
Merged

mindsers merged 2 commits into
mainfrom
feat/rooms-r4-7-creation-rows

Conversation

@mindsers

Copy link
Copy Markdown
Contributor

Parallel rooms R4, PR 7. A part held in several rooms is created as one item with a row per room, no longer one copy per room. This needs #700, so its archive carries such parts.

What changes:

  • writeTemplateItems (give-programme.server.ts): the item is written in its main room's place, with the track and trackOrder its first copy had. The item trigger names the meeting's main room exactly as before.
  • holdInRooms (new, part-room-writes.server.ts): for each other room, it upserts the meeting's room by name with the template room's order, then creates the row.
    • Rooms are made after the item, never before: the item trigger's prune_schedule_rooms removes any room without a row on every item write. Each room gets its row in the same step, so a later part's prune keeps it.
  • Both creators take it:
    • giving a meeting its programme: new, recurring, or ahead; the recurring-meetings job goes through the same path;
    • adding a programme schedule from its template (also how « Changer le type » re-adds one).
  • No migration and no reader change: the readers read rows since R3/R4 PRs 1–5b, and the writers write rows since feat(events): assigning writes the room's row #696.

Moves are safe: nothing moves an item between programmes. changeEventKind deletes and re-adds schedules, and attachEventItems only touches items with no schedule. So the trigger's refusal to move a part held in several rooms is never reached.

Not in this PR:

  • Editing one meeting's rooms by hand, and « Modifier le planning » per room. The meeting's schedule edit page lists a part held in several rooms once, under its main room. Those come next, with their board.
  • Merging the copies existing meetings already hold (a later PR).
  • Notifications naming the room.

Tests:

  • schedule-add integration: a template part held in the main room and « Salle B » comes out as one item, in the place Salle principale / 1, with rows main (order 0) and « Salle B » (order 1). It failed before the change, with two copies.
  • The rooms fixture (13 suites):
    • its rows meeting is now creation itself, and it checks there are two rows;
    • its copies meeting, the shape meetings created before R4 still hold, is split back by hand: the B row comes off, and a « Salle B » copy item is added.
    • Every reader suite passes on both shapes.
  • Unit 6,990; integration 195 files / 1,168. No reference moved: the reference fixture holds no part in several rooms. Lint 194 (unchanged); all six guards pass.

Parallel rooms R4: creation stops writing a part held in several rooms as
one copy per room. writeTemplateItems writes its item in its main room's
place (track and trackOrder as its first copy had), then holdInRooms makes
each other room with its row, after the item so the item trigger's prune
never removes a room before its row exists. Both creators take it: giving
a meeting its programme (new, recurring, ahead) and adding a programme
schedule from its template.

The rooms fixture's rows meeting is now creation itself; its copies
meeting, the shape meetings created before R4 still hold, is split back
by hand.
…meeting's edit page

#701 review: the meeting's « Modifier le planning » offered « Groupe /
Salle » and « Ordre de la salle » on a part held by rows, whose rooms the
item trigger keeps whatever its track says, so a save changed item.track
under unchanged rooms. updatePartAssignment now keeps track and trackOrder
for a part held in several rooms and writes the rest; the edit page hides
the two fields for it (itemsHeldInRooms). An older meeting's copies, each
in one room, still move with them.
@mindsers
mindsers merged commit 61898bd into main Nov 28, 2026
7 checks passed
@mindsers
mindsers deleted the feat/rooms-r4-7-creation-rows branch November 28, 2026 18:14
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.

1 participant