Skip to content

Membership data (organization, dates) and Celery renewal reminders - #169

Merged
lbougan merged 13 commits into
mainfrom
feat/membership-data-and-renewal-reminders
Oct 26, 2026
Merged

lbougan merged 13 commits into
mainfrom
feat/membership-data-and-renewal-reminders

Conversation

@lbougan

@lbougan lbougan commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Membership.started / until become dates. Membership runs one year from joining; renewing early extends from the current end date. Both dates are editable in the admin. Existing rows migrate to until = Dec 31 of the stored year and started = paid date of the linked payment, else Jan 1 of the stored year (verified forwards and backwards on a 0024-shaped SQLite).
  • New organization and organization_type on Membership, required on the application form. Existing members with a membership are redirected once to /membership/details to fill them in (admin, SSO gateway, payments and the apply form are exempt).
  • Membership admin shows name, last name, first name, email, organization, type, started, until, active; sortable; filters on active / type / organization type; search on names, email, organization. Excel export extended.
  • Renewal reminders at 60 and 30 days before the end date, on the day, and 30 and 60 days after. A Celery beat task sweeps daily (06:00 UTC) and enqueues one retrying send task per member; each send is logged in MembershipReminder so nothing goes out twice. Honorary members and members with a pending renewal invoice are skipped. manage.py send_membership_reminders --dry-run previews what would be sent.
  • RegistrationOption.membership_end_year becomes membership_until (date); Payment.mark_paid still accepts the legacy key present in already-stored payment data.
  • Celery broker on hubdds is the existing Redis (Indico uses db0/db1), this app uses db2. Deployment steps for the worker and beat units are in deployment.md.

Note: conftest.py env defaults do not reach import-time settings because pytest-django imports settings first; the Celery test configuration is therefore applied in pytest_configure on the settings object. The pre-existing Event.description migration drift is untouched.

Test plan

  • CI green on 3.10 / 3.11 / 3.12 (uv run pytest: 73 passed locally, new modules at 100% coverage)
  • Migration smoke test on a 0024-shaped SQLite: started/until conversion forwards and backwards (done locally)
  • After deploy: manage.py send_membership_reminders --dry-run lists the expected members; first automated wave is 2026-11-01 for memberships ending 2026-12-31
  • Admin changelist renders with the new columns on production data
  • A member with missing organization is redirected to /membership/details once and lands on the profile afterwards

@lbougan
lbougan merged commit d80c33f into main Oct 26, 2026
8 checks passed
@lbougan
lbougan deleted the feat/membership-data-and-renewal-reminders branch October 27, 2026 15:14
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.

1 participant