Skip to content

Conversation

@mroderick
Copy link
Collaborator

@mroderick mroderick commented Feb 1, 2026

The branch from this PR has been branched from #2455, please review and merge that one first and then rebase this one.


Summary

This PR includes two major improvements:

1. Fix Issue #2367 - Empty coaches list in workshop feedback form

Problem: When students tried to submit workshop feedback, the coaches dropdown was empty and they couldn't complete the form.

Root Cause: The feedback controller filtered for coaches where attended=true, but:

  • Feedback emails are sent the day after workshops
  • Coaches are only marked attended=true when organizers manually verify attendance
  • At feedback time, coaches have attending=true but attended=nil

Solution:

  • Changed query to use accepted_or_attended scope (includes coaches who either RSVP'd OR had attendance verified)
  • Added ORDER BY attended DESC NULLS LAST to prioritize verified coaches first
  • Students can now submit feedback immediately without waiting for attendance verification

Tests Added:

  • Test for coaches who RSVP'd but haven't been verified yet
  • Test for verified coaches appearing before unverified coaches in dropdown

Fixes #2367

Test Results

All tests passing:

  • ✅ 9/9 feedback tests pass
  • ✅ Full test suite passes in parallel
  • ✅ Coverage maintained at ~95%

Screenshots

Before (Issue #2367)

No coaches in dropdown - user cannot submit feedback

After (Issue #2367)

Coaches appear in dropdown, verified coaches listed first

Copy link
Collaborator

@olleolleolle olleolleolle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well-tested!

@olleolleolle
Copy link
Collaborator

@mroderick The other PR is merged, so that 1 commit in this PR can be rebased on top of latest changes.

Resolves issue where no coaches appeared in the feedback dropdown when
students tried to submit workshop feedback.

Root cause: The feedback controller was filtering for coaches where
attended=true, but attendance is only marked after organizers manually
verify it. When feedback emails are sent (the day after workshop),
coaches have attending=true but attended=nil.

Changes:
- Updated set_coaches to use accepted_or_attended scope instead of attended
- Added ORDER BY with NULLS LAST to prioritize verified coaches first
- Added test for coaches who RSVPd but haven't been verified yet
- Added test for verified coaches appearing before unverified coaches

This allows students to submit feedback immediately after workshops,
even before organizers verify attendance, while still prioritizing
verified coaches when that data is available.

Fixes codebar#2367
@mroderick mroderick force-pushed the issue-2367-workshop-feedback branch from 9d750b8 to 544c848 Compare February 2, 2026 08:53
@mroderick mroderick merged commit 3da4af9 into codebar:master Feb 2, 2026
14 of 15 checks passed
@mroderick mroderick deleted the issue-2367-workshop-feedback branch February 2, 2026 09:04
@olleolleolle
Copy link
Collaborator

@mroderick 🎉 Celebrate!

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.

Codebar Workshop Feedback Submit

2 participants