civicrm-event-organiser
civicrm-event-organiser copied to clipboard
Deleting an event in Civi does not delete corresponding event in EO
Current Behavior
- When you delete an event in Civi it does not delete the corresponding event in EO
Expected Behavior
- When event is deleted in Civi, it should delete an event in EO
@kurund I think this has been discussed elsewhere and it was decided not to delete the EO event because there may be unintended data loss. Similar logic was thought through in the reverse direction too. See:
https://github.com/christianwach/civicrm-event-organiser/blob/master/includes/civicrm-event-organiser-eo.php#L292-L302
And:
https://github.com/christianwach/civicrm-event-organiser/blob/master/includes/civicrm-event-organiser-eo.php#L324-L331
If that is your desired behaviour, it's simple to do so in a separate plugin.
FWIW I'm happy to add actions in the relevant places if you want to piggyback the existing hooks and exclusions in this plugin.
@christianwach Thanks for the quick response, will check and let you know.
@christianwach one could argue that you do the thinking about data loss before you delete the event in CiviCRM. Or is there other data / things that I am not thinking about.
Would you be up for us adding a setting to the extension as an alternative approach to adding actions?
Or is there other data / things that I am not thinking about.
@michaelmcandrew It depends on where your canonical data resides. If CiviCRM Events are the source of your canonical data, then sure, deleting EO Events when CiviEvents are deleted makes sense. If your source data resides in EO (with CiviCRM in the background, so to speak) then deleting the CiviCRM Event can, for example, be done in order to regenerate it on the next save of the EO Event. Any delete process also has to consider what happens when EO Repeating Schedules are modified and the "Delete unused CiviEvents" checkbox is checked.
Would you be up for us adding a setting to the extension as an alternative approach to adding actions?
I'm happy to consider a setting - or, more likely, a group of settings - if they respect the complexity of the issue and work for everyone.