Send email when user group expiry date is updated
Send email notification on member expiry date update.
The following discussion from !50217 (merged) should be addressed:
-
@manojmj started a discussion: (+1 comment) Hmm, I think this is going to be problematic.
If we look at the email content being sent out in
notification_service.update_group_member
, it talks about changes to access level of the member only and nothing about expiry date. If we trigger the same email for expiry date changes too, it would confuse the email recipients and that would be wrong.Best would be to not make the changes in
group_member.rb
forpost_update_hook
and only make further changes inee/group_member.rb
, so likeoverride :post_update_hook def post_update_hook super # takes care of email delivery for access changes alone if saved_change_to_access_level? || saved_change_to_expires_at? execute_hook_for(:update) end end
WDYT?
🙂 Also, given that we are now discussing this, it would be a good idea to create a follow-up for email notifications on member expiry date updates too
🙂