Skip to content

chore: forward-port main → develop after release 2026-10-28 (#1149 attendance email) - #1181

Merged
waritctd merged 11 commits into
developfrom
chore/forward-port-main-2026-10-28
Oct 28, 2026
Merged

waritctd merged 11 commits into
developfrom
chore/forward-port-main-2026-10-28

Conversation

@waritctd

Copy link
Copy Markdown
Owner

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 from APP_ATTENDANCE_MONTHLY_REPORT_TO / _CC; a blank recipient turns it off.
  • SchedulingConfig (comment only), application.yml (the monthly-report block), and its integration test.
  • render.yaml: the image tag catches up to v2026-10-28 and 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

waritctd and others added 11 commits October 28, 2026 01:54
…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)
@vercel

vercel Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
demo-glr Ready Ready Preview Oct 28, 2026 1:29am UTC

Request Review

@waritctd
waritctd merged commit 4303326 into develop Oct 28, 2026
12 checks passed

This branch was successfully deployed

2 active deployments
Preview — 22f3c66a Deployed Oct 28, 2026 by vercel[bot]
Production — 22f3c66a Deployed Oct 28, 2026 by vercel[bot]
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.

1 participant