Factorizer/Cluster ERP WikiCluster ERP Türkçe
Home / Business modules

Reference

Intranet events

Reference for the events sub-module of intranet, with company events, invitations, RSVPs, capacity, change notifications, visibility, and media.

This page describes the events sub-module in src/cluster_erp/modules/intranet/events/. An intranet event (IntranetEvent) is a company event with invitations, answers (RSVPs), an optional capacity with a waiting list, and a log of every change. The rules live as pure functions in events/lifecycle.py; the service loads rows, asks those functions, and writes back (src/cluster_erp/modules/intranet/events/lifecycle.py:1-21).

Scope and source

  • Defined in: src/cluster_erp/modules/intranet/models.py (IntranetEvent, IntranetEventInvitation, IntranetEventChange, IntranetEventRsvp, IntranetMedia), events/lifecycle.py, events/services.py, events/routes.py, events/schemas.py, and events/metadata.py.
  • Count: 5 tables, 15 routes in events/routes.py, 6 actions built by the helper _action in events/metadata.py (src/cluster_erp/modules/intranet/events/metadata.py:45-55, src/cluster_erp/modules/intranet/events/metadata.py:202-208).

Event fields

Name Meaning Source
title, description, body Text src/cluster_erp/modules/intranet/models.py:1111-1135
starts_at, ends_at, all_day, timezone Time src/cluster_erp/modules/intranet/models.py:1111-1199
location, is_online, join_url Place src/cluster_erp/modules/intranet/models.py:1111-1199
space_id, audience_segment_id Space and audience src/cluster_erp/modules/intranet/models.py:1111-1199
visibility, attendee_list_visibility open, invite_only, or private; who sees the attendee names src/cluster_erp/modules/intranet/events/lifecycle.py:60-61
rsvp_enabled, capacity, waitlist_enabled, reminder_minutes Answer settings src/cluster_erp/modules/intranet/models.py:1111-1199
owner_party_id, co_organizer_party_ids Organisers src/cluster_erp/modules/intranet/models.py:1111-1199
status, revision_no, published_at, cancelled_at, cancelled_by, cancel_reason, archived_at, invited_count Lifecycle record src/cluster_erp/modules/intranet/models.py:1111-1199

An invitation (IntranetEventInvitation) records the source everyone, segment, direct, or team, and the revision the person was last told about. An answer (IntranetEventRsvp) is going, maybe, or declined, with a waiting-list flag. A change row (IntranetEventChange) records the revision, the action, the actor, the changed fields, and whether the change was material (src/cluster_erp/modules/intranet/models.py:1201-1298, src/cluster_erp/modules/intranet/events/lifecycle.py:62-63).

Statuses and actions

The stored statuses are draft, published, cancelled, and archived. completed is derived: a published event whose end has passed reads as completed, and nothing is written (src/cluster_erp/modules/intranet/events/lifecycle.py:33-48, src/cluster_erp/modules/intranet/events/lifecycle.py:164-174).

stateDiagram-v2
 [*] --> draft
 draft --> published: publish
 published --> cancelled: cancel with reason
 cancelled --> published: uncancel within 24 hours
 draft --> archived: archive
 published --> archived: archive
 cancelled --> archived: archive
 archived --> draft: restore

In prose: an event is drafted, published, and may be cancelled with a reason the invitees can read. A cancellation can be undone within 24 hours. Every state except archived can be archived, and Restore to draft brings it back (src/cluster_erp/modules/intranet/events/lifecycle.py:42-59, src/cluster_erp/modules/intranet/events/lifecycle.py:303-311).

Action Label Condition Effect Source
publish Publish status is draft builds invitations, may notify invitees, emits IntranetEventPublished src/cluster_erp/modules/intranet/events/services.py:457-474, src/cluster_erp/modules/intranet/events/services.py:587-600
cancel Cancel event status is published needs a reason, notifies invitees and attendees, emits IntranetEventCancelled src/cluster_erp/modules/intranet/events/services.py:475-501
uncancel Undo cancellation status is cancelled only within the window src/cluster_erp/modules/intranet/events/services.py:502-521
remind Send reminder status is published notifies attendees or those who have not answered src/cluster_erp/modules/intranet/events/services.py:528-552
archive Archive status is not archived archives src/cluster_erp/modules/intranet/events/services.py:522-524
restore Restore to draft status is archived back to draft src/cluster_erp/modules/intranet/events/services.py:525-527

A seventh action, invite, adds direct invitations and is not declared in metadata (src/cluster_erp/modules/intranet/events/lifecycle.py:51-53, src/cluster_erp/modules/intranet/events/services.py:553-570).

Rules

  • A draft is edited freely; a published event is edited with a revision bump; a cancelled or archived event is not editable (src/cluster_erp/modules/intranet/events/lifecycle.py:55-57, src/cluster_erp/modules/intranet/events/services.py:356-442).
  • Each edit writes a change row with the field diff. A change of time or place is material: every invitee and attendee is told and anyone who answered is asked whether the answer still holds. Other changes reach attendees only. Organisers are never told about their own edits (src/cluster_erp/modules/intranet/events/lifecycle.py:65-68, src/cluster_erp/modules/intranet/events/lifecycle.py:207-228).
  • Only going takes a seat. A full event with a waiting list waitlists the answer; a full event without one refuses it with INTRANET_EVENT_FULL (src/cluster_erp/modules/intranet/events/lifecycle.py:231-264).
  • An answer is accepted only on a published event with answers enabled (src/cluster_erp/modules/intranet/events/services.py:605-615).
  • Visibility: organisers and holders of the oversight bypass see everything. Others never see drafts, archived events, or private events; an invite-only event needs an invitation; an open event needs the audience or an invitation (src/cluster_erp/modules/intranet/events/lifecycle.py:266-288).
  • Attendee names are shown to everyone, to attendees only, or to organisers only, by attendee_list_visibility (src/cluster_erp/modules/intranet/events/lifecycle.py:290-301).
  • GET /events/{id}/ics returns a calendar file built from the event (src/cluster_erp/modules/intranet/events/routes.py:295-322, src/cluster_erp/modules/intranet/events/services.py:739-770).

Routes

Router Paths Permission Source
event_router /events list, create, read, update, delete, action, rsvp, rsvps, invitations, changes, ics intranet_event.read, .create, .update src/cluster_erp/modules/intranet/events/routes.py:41, src/cluster_erp/modules/intranet/events/routes.py:57-322
media_router /media/{entity_type}/{entity_id} list and add; /media/{media_id} update and delete intranet_content.read, intranet_content.update src/cluster_erp/modules/intranet/events/routes.py:42, src/cluster_erp/modules/intranet/events/routes.py:325-370

DELETE /events/{event_id} needs intranet_event.update (src/cluster_erp/modules/intranet/events/routes.py:145-148). Media rows (IntranetMedia) attach covers and galleries to posts and events by entity type and id (src/cluster_erp/modules/intranet/models.py:1300-1329).

Other modules

GetUpcomingIntranetEvents answers what a person may see of the company calendar in the coming days, with the same visibility rules (src/cluster_erp/modules/intranet/module.py:291-303, src/cluster_erp/modules/intranet/events/services.py:709-737). The events IntranetEventPublished, IntranetEventUpdated, and IntranetEventCancelled are emitted (src/cluster_erp/modules/intranet/events/services.py:432, src/cluster_erp/modules/intranet/events/services.py:498, src/cluster_erp/modules/intranet/events/services.py:591). A subscribe call for them was not found in src/.

Terms introduced

Term Code identifier Definition Turkish term Source
RSVP IntranetEventRsvp A person's answer to an event: going, maybe, or declined. Katılım yanıtı src/cluster_erp/modules/intranet/models.py:1269
material change MATERIAL_FIELDS A change of time or place that every invitee is told about. Esaslı değişiklik src/cluster_erp/modules/intranet/events/lifecycle.py:66

Verified against commit 92f8051 on 2026-11-13.

Verified against commit 92f8051 · 2026-11-13