Skip to content

Include submitted form contents in hackathon request confirmation email - #276

Merged
gregv merged 1 commit into
developfrom
feature/hackathon-request-email-summary
Aug 31, 2026
Merged

Include submitted form contents in hackathon request confirmation email#276
gregv merged 1 commit into
developfrom
feature/hackathon-request-email-summary

Conversation

@gregv

@gregv gregv commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • The /hack/request confirmation email was generic — requesters had no copy of what they submitted. It now includes a "Your Submission" table with the full form contents, on both initial submit and self-service edits.
  • create_hackathon / update_hackathon_request pass the full payload to send_hackathon_request_email(request_data=...); a new _render_request_summary_html renders it. Backend-only — no frontend or API contract changes.
  • Since the email CCs questions@ohack.org, the team also gets the form contents in readable form (not just the raw JSON Slack dump).

Details

  • Labels mirror the admin HackathonRequestDetailDialog (Organization, Theme, Preferred call date, …); nonprofitSource values map to the form's actual checkbox wording.
  • Human formatting: dates as "Friday, October 2, 2026", budget as $15,000, custom theme as "Custom — {their text}", responsibilities as "Venue & equipment: Your organization"-style rows.
  • All user values are HTML-escaped (user input into email HTML). Empty fields, donationPercentage: 0, and internal keys (status, created, agreement checkboxes) are skipped.
  • Graceful no-op when no payload is passed — email renders exactly as before.

Testing

  • All 18 tests in api/messages/tests/test_hackathon_requests.py pass: 13 pre-existing + 5 new (labels, HTML escaping, skipped fields, empty payload, payload pass-through).
  • Rendered a sample submission through the real function and inspected the HTML output.

🤖 Generated with Claude Code

The /hack/request confirmation email was generic — recipients had no copy
of what they submitted. Render an HTML-escaped 'Your Submission' table
(labels mirror the admin HackathonRequestDetailDialog) in the email for
both create and self-service update.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@gregv
gregv merged commit 932e68a into develop Aug 31, 2026
6 checks passed
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