Skip to content
Snippets Groups Projects
user avatar
Nicolas Lempereur authored
When editing a recurring event clicking `Update only this instance`
allow us to detach this event from the recurring sequence, but without
clicking it there are instances where the event will still be detached
maybe unexpectedly.

Clicking on it will create an event which shadow the recurring one that
being done thanks to:

- recurring_id: the id of the recurring event creating this event
- recurring_id_date: start of the virtual event this new event shadows

Before this commit: when the start or end date of an recurring event is
changed, all modification are not applied on the recurring events but
only the current virtual event occurrence is detached and modified.

After this commit:

- when the end date of a recurring event is modified, it is modified for
  all the instance (not detached) of the recurring event,

- when the start date of a recurring event is modified, it is modified
  all the instance (not detached) of the reccuring event and if:

  * one occurrence of the recurring event is still on a (not-moved)
    detached event of this recurrence, this virtual event will be
    shadowed.

  * a detached event has now no occurrence of the recurring event on its
    day, it will still be left untouched but will now not shadow an
    event anymore.

eg.

we start with recurring event A on 4, 5, 6 => we see [4: A, 5: A, 6: A]

-> detach event on 5 calling it B => we see [4: A, 5: B, 6: C]
-> change start of recurrence to 5 => we see [5:B, 6:A, 7: A]
-> change start of recurrence to 7 => we see [5:B, 7:A, 8: A, 9:A]
-> delete detached event B on 5 => we see [7:A, 8: A, 9:A]
-> change start of recurrence to 3 => we see [3:A, 4: A]

closes #10873
fixes #10278
opw-665700
33755f18
History
Name Last commit Last update