localgovdrupal / localgov_workflows

Default editorial workflow for LocalGov Drupal content.
GNU General Public License v2.0
0 stars 1 forks source link

Delete the scheduled transition when the review entitiy is deleted or vice versa #98

Open andybroomfield opened 1 month ago

andybroomfield commented 1 month ago

In order to uninstall, we need to delete all the the review date entities. Except doing this will leave the scheduled transitions in place. So we need a way to saftly remove the scheduled transitions and then remove the entitiy. The review date entiity does store the transition id, so we can use that. Also should apply the same vice versa.

stephen-cox commented 1 month ago

It's easy enough to add a hook to delete the associated scheduled transition entity when deleting a review date entity.

One concern is as scheduled transitions are separately managed, it is possible a user may use one created by the review date for some other purpose. This is probably quite unlikely, but it is something we should at least consider.