feat(admin): track organization donations over time
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 45/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Ruhig
- Bereich
- api, authorization, database, full-stack
Rechercherichtung
Start by locating the organization admin API, the organizations detail page, and the migration and audit-middleware entry points referenced in the requirements. Review how org_memberships and event_sponsorships handle permissions and history, then verify that donation CRUD, per-currency totals, yearly running totals, staff gating, and mutation audit events are covered.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Summary
Track financial contributions from organizations across time, separate from the recurring-membership tier system. Donations are one-time or campaign-attributed contributions that don't fit org_memberships (annual recurring) or event_sponsorships (event-tied).
Requirements
- New
org_donationstable:id,organization_id(FK → organizations.id ON DELETE restrict),amount_cents(bigint),currency(text, ISO 4217, default 'USD'),donation_date(date NOT NULL),campaign(text, nullable — free-form for now),fiscal_year(int, nullable),notes(text),created_at/updated_at/recorded_by_user_id(audit columns) - Migration adds the table + index on
(organization_id, donation_date DESC)for fast per-org history queries - API:
GET/POST/PATCH/DELETE /admin/organizations/:id/donations; list returns rows sorted bydonation_datedesc with per-currency totals as aggregates - Org detail page: new "Donations" tab listing the org's contribution history with running totals by year
- Permissions: donation writes gated on staff tier (
canEditOrganizations); consider acanRecordDonationspolicy if we want to lock this down further later - Audit middleware captures all donation mutations (
organizations.donation.create,.update,.delete)
Context
Why not extend org_memberships? Memberships are recurring annual tiers with one active row per org; donations are arbitrarily many transactions across time, often campaign-attributed. Why not extend event_sponsorships? Donations aren't event-bound. The clean split is three independent tables sharing only the organization_id FK.
Implementation Notes
amount_cents as bigint keeps us currency-precision-safe without a numeric type. Storing currency per-row instead of org-level lets a single org's history span currency changes (e.g., GBP → USD after a UK org's US subsidiary takes over donations).
Fiscal year is nullable because US-RSE doesn't have one defined yet — leaving the column means we can backfill it later via a single UPDATE keyed off donation_date once the policy is set.
- Vorherrschende Sprache
- HTML
- Sterne
- 33
- Forks
- 107
- Ø Merge
- 14 Std. 6 Min.
- Gemergte PRs (30 T.)
- 19
Entwicklungsumgebung
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus USRSE/usrse.github.io
-
update community awardsOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
USRSE/usrse.github.io#2117 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 63/100
USRSE/usrse.github.io#2115 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
broken-links
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
USRSE/usrse.github.io#2099 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
USRSE/usrse.github.io#2085 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 85/100
USRSE/usrse.github.io#2001 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in USRSE/usrse.github.io
Ähnliche Issues
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
genfeedai/genfeed.ai#11828 ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement good first issue help wanted
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 83/100
NOAA-OWP/ngen#1110 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
ExpressionEngine/ExpressionEngine#5493 ·
Maintainer antworten meist innerhalb von 5 Tagen
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 95/100
-
integration: llama_cpp
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
home-assistant/core#195670 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag