Closed ETLaurent closed 2 years ago
This is for the A2 Kimpton instance. There are some issues with the recurring events option, perhaps a bug or might be an incomplete feature. For the kind of event that occurs regularly, they want to make sure they only have to enter the details once with multiple dates. Here's the functionality that is needed: * When adding an event, the user selects "recurring" and then can select from weekly, monthly, ~or custom.~ * When selecting weekly, the user should be able to pick a date and time such as "Friday at 5PM" * After saving, this event should appear on the grid calendar on all of its dates. This could be solved by [https://linear.app/apostrophecms/issue/PRO-2827/error-occurs-when-i-try-to-save-a-recurring-event](https://linear.app/apostrophecms/issue/PRO-2827/error-occurs-when-i-try-to-save-a-recurring-event)
What happens if the event was repeated properly the first time? If that inserted 5 events the first time, does saving it again insert 5 more or do the relevant fields get cleared after each repeat to prevent that in some way? I don't see any indication of that.
@boutell Indeed it will insert 5 more events. Thing is when we edit a single day event to change it to recursive, it won't create the expected events if we use afterInsert (which seems to be problematic). We could avoid creating new replicated events when children events exist (using parentId field), and we could also update the "children" events with the new values of the parent one. Wdyt?
Summary
Replicate recurring events after updating them, not only after their first insertion into the database.
What are the specific steps to test this change?
What kind of change does this PR introduce?
(Check at least one)
Make sure the PR fulfills these requirements:
If adding a new feature without an already open issue, it's best to open a feature request issue first and wait for approval before working on it.
Other information: