GTBitsOfGood / GTBitsOfGood/VolunTrack
Reminder Emails: 48-hour Shift Reminder Emails
- Dominant language
- JavaScript
- Stars
- 12
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
## Context
Volunteers should receive a reminder email 48 hours before their shift. This was built by a previous team and all the pieces still exist, but volunteers are not receiving them. Admins will need to send these reminders out by hand right now.
## Requirements
There are three separate problems here:
- **The job reports success while sending nothing**
- **Pending and denied volunteers are being reminded**
- **The scheduled job is switched off**
All three sit in the same two files plus the workflow, so scoping them together
## What you need to implement
**1. Find out what is actually happening first.** The endpoint returns a success response even when it finds nothing to send:
```ts
if (filteredEvents.length === 0) {
return res.status(200).json({ success: true, message: "No events requiring reminders", count: 0 });
}
```
Email failures are also swallowed and never surface, so an expired API key looks identical to a normal run. Hit the endpoint manually against a known event and read the real response before changing anything.
Worth checking how many events actually have the reminder toggle turned on, since it defaults to off. If that number is close to zero then this is not a code problem.
**2. Only remind approved volunteers.** The lookup in `reminders.ts` pulls every registration for the event:
```ts
const registrations = await Registration.find({ eventId: { $in: filteredEventIds } }).lean();
```
**3. Re-enable the scheduled job.** It needs turning back on in the Actions tab. Do this only if possible, otherwise contact me so I can do so
## Acceptance Criteria
- [ ] Root cause identified and written up before any fix goes in
- [ ] Reminders only go to approved volunteers
- [ ] Failures are correctly reported and shown
- [ ] Job is running again and shows a green run
- [ ] Verify these changes before PR and show these changes
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.