Skip to content

Retire Pledge & Buy-to-Unglue campaigns properly (model + UI + migration + tests) #1195

Description

@rdhyee

BLUF (updated 2026-08-03)

What this issue is, in plain English: Unglue.it historically offered three campaign types; two of them — Pledge (Kickstarter-style) and Buy-to-Unglue (sales advance an ungluing date) — are being retired. "Retired" means: no new campaigns of those types can be created or launched, while the two live legacy campaigns (#126 Lagos 2060, #137) keep operating under their original terms. An earlier attempt (#1168) did this incompletely at the model layer; this issue scoped doing it properly across model, UI, migration, ToS, and tests.

Status: implemented — all checkboxes done via PR #1213 (retire-pledge-b2u-1195, 11 commits). The PR is CC+Codex+LGTM after a 3-round adversarial review (verdict), deployed on test.unglue.it with a test-suite red-list identical to master's baseline (zero new failures), and live-verified (ToS, FAQ, /rightsholders/).

What remains before this closes:

  1. ⚖️ Eric's legal review of the ToS changes + confirming the effective date — the two checkboxed merge gates in the Retire Pledge & Buy-to-Unglue campaigns (#1195) #1213 PR body
  2. Merge → deploy (test → release PR → prod)
  3. Separate decisions, deliberately out of scope here: fate of the two legacy campaigns (leave vs convert to THANKS), admin lockdown, close-or-rebase FAQ copy: judgment-call edits + ⚠️ decisions for Eric (#1165) #1168. Follow-up test coverage: Add mocked-Stripe end-to-end tests for THANKS contributions (follow-up to #1213) #1215.

Split out from #1168, where the FAQ-copy PR also disabled new Pledge/Buy-to-Unglue campaigns at the model level — but incompletely. Do this as a deliberate patch.

Background: #1168 reduced Campaign.type choices to THANKS only and blocks launching REWARDS/BUY2UNGLUE. The copy edits there are fine and ship separately; this issue tracks doing the actual retirement coherently.

Required work (CC + Codex review of #1168):

  • Fix crash: the new may_launch = False for REWARDS/BUY2UNGLUE appends no problem message, but activate() reads self.problems[0]IndexError instead of a clean UnglueitError when an old-type campaign is activated directly. Append a launch-block problem message. (Retire Pledge & Buy-to-Unglue campaigns (#1195) #1213 a4734082 + hardened fail-closed in bf4611ad: anything ≠ THANKS is unlaunchable with a clean message; regression tests incl. unknown type 99.)
  • Campaign.type default=REWARDS becomes a non-choice → set default=THANKS (or keep choices and gate differently). (default=THANKS; legacy choices retained so existing campaigns validate/display.)
  • Add the migration for the choices change (Django 4.2 serializes choices; makemigrations --check will flag it). (core/migrations/0030_retire_pledge_b2u.py — state-only, no DDL; applied + --check verified clean on test.)
  • UI/creation paths still offer Pledge/B2U: rh_views.py still initializes new campaigns as type 2; rh_works.html, manage_campaign.html, work.html, faq_b2u.html still present those flows. Make the front-end consistent with 'no new Pledge/B2U.' (All creation paths closed: rh_views.py c_type→THANKS, OpenCampaignForm offers/accepts THANKS only, rh_works.html rewritten; also FAQ menu, libraries.html, rh_intro.html. manage_campaign.html/work.html/faq_b2u.html deliberately retained — they display/manage existing legacy campaigns, per the block-new-only decision below; faq_b2u.html stays URL-reachable for legacy supporters but is de-linked from nav.)
  • Tests: existing tests assume default pledge campaigns can launch — update for legacy type 1/2 behavior. (force_activate() helper simulates pre-retirement launches; new CampaignRetirementTests; payment/tests.py pinned to type=REWARDS; THANKS launch-and-activate covered.)
  • Decide: keep existing/live campaigns of those types fully functional (display/handling) while only blocking new ones (that's the current intent). (Affirmed and implemented as stated. The further question — whether to eventually convert S3 storage #126/turns out pubdate messes up distinct, MySQL doesn't support DISTINCT ON #137 to THANKS — is a separate Eric decision, tracked in the Retire Pledge & Buy-to-Unglue campaigns (#1195) #1213 meeting agenda.)

Refs #1168 (copy PR), Eric's intent: 'Buy-to-Unglue, Pledge no longer offered.'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions