Skip to content

3468521: When changing recurrance, identical date combinations should not be deleted & recreated

Let's assume you have an eventseries, with 3 custom dates:

  • 1st of april, 2024, 10:00 - 12:00
  • 2nd of april 2024, 10:00 - 12:00
  • 3rd of april 2024, 10:00 - 12:00

Now, let's say that we want to add a 4th of april. If an editor goes to the series edit page, they and add the 4th of april, the 3 existing instances will be deleted, and re-created.

This is a problem for anything that uses APIs, as the instances will get new IDs. It is also a problem if any of the existing instances have had custom values added.

I can see in the code that we have a "events_to_create" array. I'd expect this array to loop through, and check that if any date combination already exists, we should not delete that - and should not create it again.

The same concept also applies for non-custom - if you update an series that only happened on tuesdays, to also happen on wednesdays.

This commits updates the previous "keys" that were formatted as a human-readable string - instead we use a timestamp, to check again.

Closes #3468521

Merge request reports