Skip to content

Add inkind donations - #801

Open
jdelagarzaf wants to merge 16 commits into
mainfrom
add-inkind-donations
Open

Add inkind donations#801
jdelagarzaf wants to merge 16 commits into
mainfrom
add-inkind-donations

Conversation

@jdelagarzaf

Copy link
Copy Markdown
Collaborator

Context

What changed

How to test it

References

ClickUp ticket

@jdelagarzaf

jdelagarzaf commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator Author

Hey @hazelngan, I reopened this PR since the latest commit went unreviewed and introduced critical issues that need fixing before merging.

  1. Blocker: The in_kind_donation_items column doesn't exist
    A previous commit deleted it and, in turn, left only donation links. Your latest commit reintroduced in-kind donation items, but there is no storage for it. You may not see the issue since your database had the column leftover from the past commit, but it currently raises an error on most pages of the site.

  2. The item selection also bypasses strong parameters. It's unvalidated user content on a public nonprofit profile; this is dangerous. Make sure it intersects against the whitelist of IN_KIND_DONATION_ITEMS items.

  3. Items are matched by exact display string; it is brittle, and any change or update for in-kind item names results in it breaking. Use either a table or stable key with display labels. Look at Cause/Service/BeneficiarySubcategory tables for this pattern.

  4. You left the \A-\s* strip from the previous implementation, but your new code never introduces dashes as it did before, meaning this is dead code. Please remove it.

  5. Make sure to add this new in-kind donation checkbox list to the admin panel, so admin users can backfill, edit, and help out organizations who may struggle adding their own items.

Make sure you run rubocop so the CI flag clears your changes

@hazelngan

Copy link
Copy Markdown
Collaborator

thanks for the feedback jorge! sorry for not catching the mistakes and i can make the changes on my end

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.

2 participants