5
11
Fork
You've already forked tomato
1

Don't add rrules to future events when splitting #153

Merged
edwardloveall merged 1 commit from el-fix-future-non-recur into main 2026年05月06日 20:58:42 +02:00

When updating future events, we take in many of the attributes being changed and
apply them to those future events. But imagine a shift with a recurring event
and other non-recurring events after the starts_at of the recurring one. If we
update the recurring event into the future, it would add the rrule to the future
events. It would make those future events recurring which creates overlapping
events.

This fixes the logic so that future events keep whatever rrule they had
previously.

This also sets the domain when testing to example.org instead of using a dynamic
CANNONICAL_HOSTNAME value

When updating future events, we take in many of the attributes being changed and apply them to those future events. But imagine a shift with a recurring event and other non-recurring events after the starts_at of the recurring one. If we update the recurring event into the future, it would add the rrule to the future events. It would make those future events recurring which creates overlapping events. This fixes the logic so that future events keep whatever rrule they had previously. This also sets the domain when testing to example.org instead of using a dynamic CANNONICAL_HOSTNAME value
Don't add rrules to future events when splitting
All checks were successful
ci/woodpecker/pr/ci Pipeline was successful
dd4cdd5c4b
When updating future events, we take in many of the attributes being changed and
apply them to those future events. But imagine a shift with a recurring event
and other non-recurring events after the starts_at of the recurring one. If we
update the recurring event into the future, it would add the rrule to the future
events. It would make those future events recurring which creates overlapping
events.
This fixes the logic so that future events keep whatever rrule they had
previously.
This also sets the domain when testing to example.org instead of using a dynamic
CANNONICAL_HOSTNAME value
jsilasbailey left a comment
Copy link

👍

👍
@ -198,6 +198,27 @@ RSpec.describe EventsService::Updater do
expect(event.exdates).to contain_exactly(one_week.floor)
end
it "does not add an rrule to future event that don't already recur" do
First-time contributor
Copy link

nit: pluralize "event that don't already recur" to "events that don't recur"

nit: pluralize "event that don't already recur" to "events that don't recur"
edwardloveall force-pushed el-fix-future-non-recur from dd4cdd5c4b
All checks were successful
ci/woodpecker/pr/ci Pipeline was successful
to 2c5b2ea18c
All checks were successful
ci/woodpecker/pr/ci Pipeline was successful
2026年05月06日 20:41:26 +02:00
Compare
edwardloveall deleted branch el-fix-future-non-recur 2026年05月06日 20:58:45 +02:00
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
rootable/tomato!153
Reference in a new issue
rootable/tomato
No description provided.
Delete branch "el-fix-future-non-recur"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?