civicrm-event-organiser icon indicating copy to clipboard operation
civicrm-event-organiser copied to clipboard

Deleting an event in Civi does not delete corresponding event in EO

Open kurund opened this issue 4 years ago • 5 comments

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 avatar Jan 20 '21 15:01 kurund

@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.

christianwach avatar Jan 20 '21 20:01 christianwach

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 avatar Jan 20 '21 20:01 christianwach

@christianwach Thanks for the quick response, will check and let you know.

kurund avatar Jan 22 '21 15:01 kurund

@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?

michaelmcandrew avatar Jan 27 '21 09:01 michaelmcandrew

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.

christianwach avatar Jan 28 '21 11:01 christianwach