Skip to content

Add scheduled periodic plain-text booking report email - #38

Open
datengraben wants to merge 1 commit into
masterfrom
claude/weekly-booking-report-email-pzleiz
Open

Add scheduled periodic plain-text booking report email#38
datengraben wants to merge 1 commit into
masterfrom
claude/weekly-booking-report-email-pzleiz

Conversation

@datengraben

Copy link
Copy Markdown
Owner

Adds a weekly or monthly plain-text report that is emailed around 04:00
in the morning. The report lists the number of confirmed bookings
(counted by booking start date) for the last 7 days, 30 days and 3
months, each compared against the immediately preceding period.

  • New Service\BookingReport builds the plain-text body and sends it via
    wp_mail(). The scheduler runs the job daily at 04:00 and the report is
    only sent on the configured interval (weekly on Mondays, monthly on the
    first of the month), since Scheduler only supports a fixed time of day
    for daily recurrence.
  • New Repository\Booking::countBookingsStartingInRange() counts confirmed
    bookings by their start date.
  • New settings in the Reminder tab: activate, interval (weekly/monthly)
    and recipient email (defaults to the site admin email).
  • Adds tests for the count query, report body and sending-day logic.

Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01UCKGDj3J4aQTPefGhLsj1C

Adds a weekly or monthly plain-text report that is emailed around 04:00
in the morning. The report lists the number of confirmed bookings
(counted by booking start date) for the last 7 days, 30 days and 3
months, each compared against the immediately preceding period.

- New Service\BookingReport builds the plain-text body and sends it via
  wp_mail(). The scheduler runs the job daily at 04:00 and the report is
  only sent on the configured interval (weekly on Mondays, monthly on the
  first of the month), since Scheduler only supports a fixed time of day
  for daily recurrence.
- New Repository\Booking::countBookingsStartingInRange() counts confirmed
  bookings by their start date.
- New settings in the Reminder tab: activate, interval (weekly/monthly)
  and recipient email (defaults to the site admin email).
- Adds tests for the count query, report body and sending-day logic.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UCKGDj3J4aQTPefGhLsj1C
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.

2 participants