rubyforgood / rubyforgood/awbw

Include active TopicSubscriptions in bulk email reminder recipients

Open
#2,071 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Ruby
Stars
15
Forks
26
Avg merge
12h 42m
Merged PRs (30d)
242

Description

Follow-up to #2070 (introduces the TopicSubscription model).

Goal

Surface people subscribed to upcoming trainings as candidate recipients on an event's bulk email reminder page (EventsController#preview_reminderapp/views/events/_reminder_recipients.html.erb, ReminderRecipientFilter), alongside the event's actual registrants.

Inclusion rule

For a given (facilitator-training) event's reminder list, add each active TopicSubscription (unsubscribed_at IS NULL) with topic: "trainings" where:

  • interested_event_id == <this event> → include only on that event's reminder list, or
  • interested_event_id is null (general) → include on all training event reminder lists.

Notes / open questions

  • Scope of "all lists": general (null-event) training subscriptions should feed facilitator_training events' reminder lists, not every event. Confirm.
  • De-dupe: a person may already be an actual registrant of the event and also have an active subscription — show them once, don't send twice. Prefer the real registration row.
  • Rendering: reminder recipients are currently EventRegistration rows. Subscription rows have none of that — decide how they appear (a distinct "Subscribed" pill/section, which filters apply, and which email is used — person.preferred_email).
  • Consent: only email subscribers who also have mailing_list_consent. Confirm.
  • On send, consider recording that a subscriber was contacted (optional).

Blocked on #2070 merging (or can build on that branch).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with #2070, then read EventsController#preview_reminder, app/views/events/_reminder_recipients.html.erb, and ReminderRecipientFilter to understand the current EventRegistration flow. Resolve the listed scope, de-duplication, rendering, filter, and consent questions before implementation. Done means eligible active training subscriptions appear once with registrants on the appropriate reminder lists.

Written by the indexing model from the issue text.

Assessment

Tech stack
rails, ruby
Domain
full-stack
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.