Subgroups Webhook - Discuss how to handle Group Transfer events

Release notes

Problem to solve

When we introduced subgroup webhooks, the transfer scenario was not covered as part of the MVC. See discussion here.

Proposal

We have a couple of options about how to fire subgroup transfer events and how to "name" them (ie, what should be the event_name in the webhook data):

  • Treat transfers as destroy event, ie, when a subgroup is transffered, it would mean the same to the parent as when a subgroup in it is destroyed.
  • Be very general: Just name the event as update, just like we would do, for say change of visibility of a subgroup event.
  • Be slightly specific: Name this event as rename as a subgroup transfer would mean change in its path anyway. But the downside here is the consumer of the webhook wouldn't actually know if the event is actually a transfer or just a rename. (We already use rename as event name for system hooks)
  • Be very specific: Introduce 2 new events for subgroup transfer (subgroup_transfer_out, subgroup_transfer_in). subgroup_transfer_out event will be fired to the webhook of the old parent and subgroup_transfer_in event will be fired to the webhook of the new parent. (if old parent/new parent are subscribed to subgroup events in their webhook preferences, of course)
  • Open to any other ideas as well.
Edited by Manoj M J