Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to link fiscal sponsors to changemaker #1490

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bickelj
Copy link
Contributor

@bickelj bickelj commented Feb 7, 2025

A fiscal sponsor in PDC terms is another changemaker. To add a fiscal sponsor to a changemaker, call the new endpoint PUT /changemakers/{changemakerId}/fiscalSponsors/{fiscalSponsorChangemakerId} To remove the relationship, call the corresponding DELETE endpoint.

The GET /changemakers/{changemakerId} endpoint now returns a list of fiscal sponsors. The list is composed of shallow changemakers to avoid a technical issue of potential infinite recursion. So the caller will not see the fields or fiscalSponsors within the fiscalSponsors returned by GET /changemakers/{changemakerId}. To get the detailed data on a changemaker, simply call the same GET with the sponsor ID.

There is some ambiguity about whether this explicitly modeled fiscal sponsorship relationship in PDC is intended to be only current relationships or both current and past relationships. Assume for now that it is both current and past, reserving DELETE for mistaken data entry.

Circular sponsorship graphs are supported but not direct self-sponsorship cycles.

Issue #1485 Support fiscal sponsor relationships between changemakers

Add ability to link fiscal sponsors to changemaker

A fiscal sponsor in PDC terms is another changemaker. To add a fiscal
sponsor to a changemaker, call the new endpoint `PUT
/changemakers/{changemakerId}/fiscalSponsors/{fiscalSponsorChangemakerId}`
To remove the relationship, call the corresponding `DELETE` endpoint.

The `GET /changemakers/{changemakerId}` endpoint now returns a list of
fiscal sponsors. The list is composed of shallow changemakers to avoid
a technical issue of potential infinite recursion. So the caller will
not see the `fields` or `fiscalSponsors` within the `fiscalSponsors`
returned by `GET /changemakers/{changemakerId}`. To get the detailed
data on a changemaker, simply call the same `GET` with the sponsor ID.

There is some ambiguity about whether this explicitly modeled
fiscal sponsorship relationship in PDC is intended to be only current
relationships or both current and past relationships. Assume for now
that it is both current and past, reserving `DELETE` for mistaken data
entry.

Circular sponsorship graphs are supported but not direct
self-sponsorship cycles.

Issue #1485 Support fiscal sponsor relationships between changemakers
Copy link

codecov bot commented Feb 7, 2025

Codecov Report

Attention: Patch coverage is 23.88060% with 51 lines in your changes missing coverage. Please review.

Project coverage is 85.49%. Comparing base (b96f134) to head (d382d78).

Files with missing lines Patch % Lines
src/handlers/changemakersHandlers.ts 4.87% 39 Missing ⚠️
src/middleware/errorHandler.ts 0.00% 8 Missing ⚠️
...ions/fiscalSponsorships/removeFiscalSponsorship.ts 50.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1490      +/-   ##
==========================================
- Coverage   86.89%   85.49%   -1.41%     
==========================================
  Files         235      238       +3     
  Lines        2931     2998      +67     
  Branches      402      418      +16     
==========================================
+ Hits         2547     2563      +16     
- Misses        384      435      +51     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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