Repository navigation
chore: forward-port main → develop after release 2026-10-28 (#1149 attendance email) - #1181
Merged
Merged
Conversation
…in release) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-to-main Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…10030 At 08:00 Asia/Bangkok on the 1st, AttendanceMonthlyReportJob mails one recipient how many days each configured employee attended in the previous month. Any punch on a work_date counts, so a lone clock-in or clock-out is a day attended. Punches resolve to an employee through AttendanceSql.RESOLVED_EMPLOYEE_JOIN, as the rest of attendance does: most fingerprint punches for these two are stored with employee_id NULL and badge_code = the employee code, so a plain employee_id join reports ~0. The recipient comes from APP_ATTENDANCE_MONTHLY_REPORT_TO (blank = off), declared sync:false in render.yaml; the address is a personal mailbox and this repo is public. Codes default to 10016,10030. Covered by AttendanceMonthlyReportJobIntegrationTest (13, real Postgres): in-only / out-only days count; in+out counts once; month bounds; unlinked punches by employee code and by card serial; zero-punch employee listed; other staff excluded; unknown code called out; no "null" for a nameless employee; one mail to the recipient with the Thai B.E. month; blank recipient and no codes send nothing; fixed-clock runs on 1 Nov and 1 Jan report October and December 2569; the real cron fires on the 1st 08:00. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…00 columns Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…st day, with a CC list
The month-end report now runs at 12:00 Asia/Bangkok on the last day of
each month (cron "0 0 12 L * *") and covers that same month, so the
last day counts the scans made before noon. The body says when the data
was taken ("ข้อมูลถึงวันที่ 31 ตุลาคม 2569 เวลา 12:00 น.").
It now CCs a configured list and goes out through the leave email's
send path (NotificationEmailService#sendLeaveSubmission): branded HTML
with names escaped, the UAT subject suffix and redirect, and CC. That
path is @async and best-effort, so a failed send is logged, not raised.
The recipient and CC come from APP_ATTENDANCE_MONTHLY_REPORT_TO / _CC
on the deployment. Neither address is in this public repo.
Tests (AttendanceMonthlyReportJobIntegrationTest, 16, real Postgres),
written first and shown red:
- every configured CC address is copied; no CC configured means none
- the HTML part repeats the lines, with names HTML-escaped
- a blank recipient sends nothing even when a CC is configured
- the noon run on 31 Oct reports October, counts that morning's scan,
and carries the cutoff line
- the 31 Dec run reports December 2569
- the real cron fires 31 Oct, 30 Nov, 28 Feb 2027 and 29 Feb 2028 at
12:00 Bangkok
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the constructor Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…l-main feat(attendance): month-end attendance-day email for 10016 and 10030 (noon, last day, with CC)
…ase/2026-10-28-develop-to-main Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…se/2026-10-28-develop-to-main Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…main release: develop → main 2026-10-28 (backend image v2026-10-28, V200)
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Forward-port of main after the 2026-10-28 release (#1179, 22f3c66), so develop has everything prod runs.
What develop gains (5 files, all from #1149, which went to main directly):
AttendanceMonthlyReportJob: emails the month's attended-day count for 10016 and 10030 at 12:00 Asia/Bangkok on the month's last day. Recipient and CC come fromAPP_ATTENDANCE_MONTHLY_REPORT_TO/_CC; a blank recipient turns it off.SchedulingConfig(comment only),application.yml(themonthly-reportblock), and its integration test.render.yaml: the image tag catches up tov2026-10-28and declares the two env keys (sync: false, set on the dashboard).Merge commit, no conflicts. No migrations. Merge commit, not squash, so main stays an ancestor of develop.
🤖 Generated with Claude Code