Commit 544c848
committed
Fix empty coaches list in workshop feedback form (Issue #2367)
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 #23671 parent 095a149 commit 544c848
2 files changed
Lines changed: 48 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
42 | 44 | | |
43 | 45 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
41 | 86 | | |
42 | 87 | | |
43 | 88 | | |
| |||
0 commit comments