Send email to activity creator on event creation#681
Closed
Copilot wants to merge 2 commits into
Closed
Conversation
- Always notify the event creator when they create an event, regardless of their new_event_mail preference - Exclude the creator from the bulk intern notification to avoid duplicate emails when creator has new_event_mail enabled - Fix typo in User model: new_event_email virtual attribute corrected to new_event_mail to match the actual DB column name - Add tests covering creator email, attendance events, and no duplicates Agent-Logs-Url: https://github.com/DispuutHamers/webapp/sessions/803e8800-4b24-4eb5-a838-36935180ee0b Co-authored-by: koenjdejong <74268574+koenjdejong@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix no email notification when activity is created for creator
Send email to activity creator on event creation
Apr 2, 2026
Member
|
Superceded by #683 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Event creators never received the new-event notification email — they were only included in the bulk send if they happened to be
internscope users withnew_event_mail: true.Changes
app/models/event.rb—send_new_event_emailnow unconditionally notifies the creator first, then excludes them from the bulk intern query to prevent duplicates. Creator is notified even forattendance: true(dispuutsborrel) events.app/models/user.rb— Fixed typo: virtual attribute declared asnew_event_emailbut DB column (and all query/form references) usenew_event_mail.test/models/event_test.rb— Added tests: creator always receives email, creator receives email on attendance events, no duplicate emails when creator also hasnew_event_mail: true.