Create individual event topics for recurring events

I’ve opened a PR implementing this as an opt-in recurring Event mode:

It adds a discourse_post_event_recurring_topic_mode site setting with two choices:

  • reuse_topic — the existing behaviour and the default
  • create_next_topic — preserve the completed occurrence Topic and create a new Topic for the next occurrence

With create_next_topic, when an occurrence ends the completed Topic is retained with its Event pinned to that completed occurrence and recurrence removed. A successor Topic is then created for the next recurrence, preserving the original title/body, category, tags and author, while advancing the Event dates.

The automated tests also cover RSVP rollover semantics: recurring going attendance is carried into the successor, while one-off attendance remains with the completed occurrence.

The rollover is also transactional, so if creating the successor fails the occurrence remains pending and can be retried rather than being left half-completed.

This specifically implements the “create the next Topic when the current occurrence ends” model. It doesn’t yet generate individual Topics for all future occurrences in advance, which is the alternative model @opcourdis mentioned above.

The existing behaviour remains the default, so this is opt-in for sites which want the completed Event Topic to act as the archive.

1 Like