Repository navigation
Add Harvest Reminder Emails and Scheduled Task - #4604
Conversation
- Added `send_harvest_reminder` preference to Member model and settings UI. - Implemented `harvest_in_next_week?` in PredictHarvest concern. - Created `harvest_reminder` email with localized templates. - Added `growstuff:send_harvest_reminders` Rake task to run weekly. - Refactored existing and new reminder tasks to use `deliver_later` for scalability. - Added unit tests for prediction logic and mailer. - Fixed a bug in the existing planting reminder task where it was using an uninitialized constant `Notifier`. Co-authored-by: CloCkWeRX <[email protected]>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
This PR implements a new notification system to remind members of upcoming harvests in their garden.
Key Changes:
send_harvest_reminderboolean column to thememberstable (default: true).harvest_in_next_week?toPredictHarvestconcern, which identifies plantings predicted to be ready for harvest within the next 7 days that haven't been harvested yet.harvest_remindertoNotifierMailerwith localized HAML templates.growstuff:send_harvest_remindersRake task, configured to run logic on Wednesdays (Heroku Scheduler pattern).deliver_laterand fixed a typo whereNotifierwas used instead ofNotifierMailerin an existing task.Testing:
spec/models/harvest_prediction_spec.rbto verify prediction logic.spec/mailers/harvest_reminder_mailer_spec.rbto verify email generation.PR created automatically by Jules for task 16703221337897327633 started by @CloCkWeRX