Skip to content

Resolves #5668 Org level disable reminder emails - #5686

Merged
awwaiid merged 11 commits into
mainfrom
5668_disable_reminders
Aug 29, 2026
Merged

Resolves #5668 Org level disable reminder emails#5686
awwaiid merged 11 commits into
mainfrom
5668_disable_reminders

Conversation

@LizPrescott

@LizPrescott LizPrescott commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator

Resolves #5668

Description

This adds new columns to the data model to track reminder enablement on the org level, adds the option to the admin user views, and enforces that choice in the mailers. Specs have been added for all of the above

Type of change

Feature!

How Has This Been Tested?

Specs plus manual tests for each user type.

@LizPrescott
LizPrescott requested a review from awwaiid August 29, 2026 18:09
Elizabeth Prescott and others added 3 commits August 29, 2026 14:22
Suppress reminder emails when the organization has turned them off:

- Monthly deadline reminders: FetchPartnersToRemindNowService now filters
  both the partner-group and organization-schedule branches by
  organizations.deadline_reminders_enabled.
- Day-before distribution reminders: DistributionsController#schedule_reminder_email
  skips scheduling, and DistributionMailer#reminder_email refuses to send,
  when organizations.distribution_reminders_enabled is false (the mailer
  guard also covers jobs enqueued before the toggle was flipped).

Specs that exercise reminder delivery opt their organization in explicitly
(the column defaults to false); organization_system_spec's deadline form
examples move under a "with monthly deadline reminders enabled" context.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9a171otfu6xuQgU7XYjN1
There is no reason to configure a reminder schedule when the organization
has turned monthly deadline reminders off.

- Edit form: new reminder-toggle Stimulus controller shows/hides the
  shared/_deadline_day_fields partial and the "Additional text for reminder
  email" box as the Yes/No radio changes.
- Read-only details page: the same blocks render only when
  deadline_reminders_enabled is true.

"Distribution email content" and "Receive email when Partner makes a
Request?" are not reminder-specific and stay visible.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9a171otfu6xuQgU7XYjN1
Comment thread db/migrate/20260829112930_add_reminder_toggles_to_organizations.rb Outdated
Comment thread spec/controllers/distributions_controller_spec.rb
Elizabeth Prescott and others added 3 commits August 29, 2026 15:06
A super admin creating an organization can now choose whether to enable
the monthly deadline and day-before distribution reminder emails, matching
the choice org admins have on their own settings page. The params were
already permitted in Admin::OrganizationsController.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9a171otfu6xuQgU7XYjN1
When an organization has turned a reminder type off, the forms that
otherwise ask a bank user to configure it now show a notice instead:

- Partner group form: replaces the deadline reminder schedule fields.
- New/edit distribution form: replaces the "Send email reminder the day
  before?" checkbox.
- Partner form: adds a note beside the "receive emails" checkbox when both
  reminder types are off.

The notice links to the organization settings page for users who can
administrate the organization, and otherwise tells them to contact an
administrator. New shared partial: shared/_reminders_disabled_notice.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9a171otfu6xuQgU7XYjN1
Simpler than filtering to only organizations that already have reminder
configuration: every organization that exists at migration time keeps
reminders on, and only organizations created afterward default to off.
Reminder emails still only go out when the org has a schedule configured,
so enabling the flag for orgs without one is a no-op.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9a171otfu6xuQgU7XYjN1
@LizPrescott LizPrescott changed the title Reminders toggle at the model level. Preserve behavior for existing orgs Resolves #5668 Org level disable reminder emails Aug 29, 2026
@awwaiid
awwaiid merged commit e2c8266 into main Aug 29, 2026
27 of 28 checks passed
@awwaiid
awwaiid deleted the 5668_disable_reminders branch August 29, 2026 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow disabling reminder emails on an organization level

2 participants