Ethsim2
(Ethan )
9월 3, 2026, 5:37오후
13
이 기능을 선택적(opt-in) 반복 이벤트 모드로 구현한 PR을 열었습니다:
main ← Ethsim12:feature-recurring-event-topic-mode
opened 05:23PM - 03 Sep 26 UTC
## Summary
Adds an opt-in mode for recurring Events where each completed occu… rrence is preserved in its own Topic and the next occurrence is created in a successor Topic.
The new `discourse_post_event_recurring_topic_mode` enum site setting has two values:
- `reuse_topic` — existing behavior and the default
- `create_next_topic` — archive the completed occurrence Topic and create a successor Topic for the next occurrence
## Details
When `create_next_topic` is enabled, the scheduled event-date monitor:
- preserves the completed Topic by converting its Event to a one-off occurrence
- appends the occurrence date to the archived Topic title, handling title-length and duplicate-title constraints
- creates the successor Topic from the original post content while advancing only the Event start/end dates
- preserves category, tags, original author and recurring Event metadata
- carries forward only recurring `going` invitees; one-off attendance remains on the completed occurrence
- performs the rollover transactionally so a failed successor creation leaves the occurrence pending for retry
- still emits the event-ended workflow trigger with the completed occurrence's recurring-series metadata
If the recurrence has no next occurrence, the completed Topic is preserved as a one-off Event and no successor Topic is created.
The existing `reuse_topic` path is unchanged.
## UI smoke test
With `discourse_post_event_recurring_topic_mode` set to `create_next_topic`:
**Site setting**
<img width="678" height="142" alt="01-admin-setting-create-next-topic" src="https://github.com/user-attachments/assets/78dc6698-6886-4c10-81d4-22d991f0f452" />
**Before rollover — recurring occurrence on September 3**
<img width="1512" height="958" alt="02-before-rollover-sep-3-every-thursday" src="https://github.com/user-attachments/assets/3150b843-1264-4990-8dd8-2e931e28b9dc" />
**Completed occurrence preserved in the dated Topic**
<img width="2048" height="1076" alt="03-archived-topic-2026-09-03" src="https://github.com/user-attachments/assets/d6d28341-f684-4ba8-9b54-2fec0c537bb7" />
**Successor Topic created for the next weekly occurrence**
<img width="2048" height="1073" alt="04-successor-topic-sep-10-every-thursday" src="https://github.com/user-attachments/assets/0ff611b4-f316-4130-bb75-7948d36e61e9" />
## Tests
Focused specs after rebasing onto current `main`:
> 22 examples, 0 failures
Coverage includes the existing reuse-topic behavior, normal successor rollover, final recurrence, all-day timezone handling, fenced-code Event markup, title collisions/truncation, restricted original authors, transactional retry behavior, recurring RSVP inheritance, and workflow event-ended payloads.
The UI and scheduled-job smoke tests confirmed that the completed Topic was preserved with a dated title and that a successor Topic was created for the following weekly occurrence, including through the normal supervised Sidekiq scheduler.
두 가지 옵션을 가진 discourse_post_event_recurring_topic_mode 사이트 설정을 추가합니다:
reuse_topic — 기존 동작이며 기본값입니다.
create_next_topic — 완료된 발생(occurrence)의 토픽을 유지하고 다음 발생을 위해 새 토픽을 생성합니다.
create_next_topic를 사용하면, 발생이 종료되면 완료된 토픽은 해당 완료된 발생에 이벤트가 고정된 상태로 유지되고 재귀 설정은 제거됩니다. 이후 다음 재귀를 위해 후속 토픽이 생성되며, 원래 제목/본문, 카테고리, 태그, 작성자는 유지되지만 이벤트 날짜는 진행됩니다.
자동화 테스트는 또한 RSVP 롤오버(이관) 의미를 다루며, 반복되는 going 참석 상태는 후속 토픽으로 이관되는 반면, 일회성 참석 상태는 완료된 발생에 그대로 남아 있습니다.
이 롤오버는 트랜잭션 기반으로 처리되므로, 후속 토픽 생성에 실패할 경우 발생 상태가 보류(pending)로 유지되며 절반만 완료된 상태로 방치되지 않고 재시도할 수 있습니다.
이것은 구체적으로 "현재 발생이 종료되면 다음 토픽을 생성한다"는 모델을 구현합니다. 위에서 @opcourdis가 언급한 대안 모델인, 모든 미래 발생을 사전에 개별 토픽으로 생성하는 방식은 아직 지원하지 않습니다.
기존 동작이 여전히 기본값이므로, 완료된 이벤트 토픽을 아카이브로 활용하기를 원하는 사이트는 이를 선택적으로 적용할 수 있습니다.
1개의 좋아요