Compare commits

..
4 Commits
Author SHA1 Message Date
joshua 6f18e40f06 Merge branch 'fix/job-times'
CI / Backend tests (push) Canceled after 0s
CI / Frontend lint, typecheck, build (push) Canceled after 0s
CI / End-to-end tests (push) Canceled after 0s
CI / Deploy tagged release (push) Canceled after 0s
2026-10-27 11:06:54 +02:00
joshuaandClaude Opus 5.5 7fdd2b8b9d Bump to 1.41.2
CI / Backend tests (push) Canceled after 0s
CI / Frontend lint, typecheck, build (push) Canceled after 0s
CI / End-to-end tests (push) Canceled after 0s
CI / Deploy tagged release (push) Canceled after 0s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 11:06:54 +02:00
joshuaandClaude Opus 5.5 8e2cb7eb4d Background jobs: show last-run times in the right time zone
pg-boss timestamps are timestamptz, and Prisma's pg adapter drops the offset in raw queries (10:55+02 came back as 10:55Z, shown as 12:55). Read them AT TIME ZONE 'UTC'.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 11:06:51 +02:00
joshuaandClaude Opus 5.5 bc73d7e3af Document APP_TIMEZONE in .env.example and SETTINGS.md
CI / Backend tests (push) Canceled after 0s
CI / Frontend lint, typecheck, build (push) Canceled after 0s
CI / End-to-end tests (push) Canceled after 0s
CI / Deploy tagged release (push) Canceled after 0s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 10:49:16 +02:00
11 changed files with 32 additions and 11 deletions
+9
View File
@@ -7,6 +7,15 @@ and this project follows [Semantic Versioning](https://semver.org/).
## [Unreleased]
## [1.41.2] - 2026-10-27
### Fixed
- **Background jobs page showed last-run times two hours ahead** (e.g. 12:55 at 10:55). Prisma's
Postgres adapter dropped the time-zone offset of pg-boss's timestamps; the query now reads them
as UTC. Job history itself was never wrong. `APP_TIMEZONE` is now in `backend/.env.example` and
SETTINGS.md.
## [1.41.1] - 2026-10-27
### Changed
+1
View File
@@ -17,6 +17,7 @@ in-process settings cache TTL) without a server restart.
| `org_email` | *(blank)* | No fallback in most places. **Exception:** the Terms of Use / Privacy Policy pages default to `privacy@example.com` (an obvious placeholder) if unset — see the Legal section below. |
| `org_phone` / `org_address` | *(blank)* | No fallback — simply omitted wherever shown if unset. |
| `app_base_url` | `APP_BASE_URL` or `FRONTEND_URL` env var, else `http://localhost:3001` | Used to build links in emails (password reset, ticket delivery, etc.). Should always be set in production. |
| `APP_TIMEZONE` (env) | `Africa/Johannesburg` | The site's time zone (an IANA name, e.g. `Europe/London`): background job schedules (e.g. the 07:00 daily summary), session dates and printed times. Also sent to the Hub in the heartbeat. Needs a backend restart. |
## Branding
+4
View File
@@ -13,6 +13,10 @@ JWT_SECRET=your_jwt_secret_here_minimum_32_characters
PORT=5000
NODE_ENV=development
# Time zone for background job schedules (e.g. the 07:00 daily summary), session dates
# and printed times. An IANA name, e.g. Africa/Johannesburg or Europe/London.
APP_TIMEZONE=Africa/Johannesburg
# Set this if the app runs behind a reverse proxy (e.g. nginx on a separate
# server) so rate limiting reads the real client IP instead of the proxy's.
# Accepts a hop count ("1"), "true"/"false", or comma-separated IP(s)/CIDR(s)
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "event-management-backend",
"version": "1.41.1",
"version": "1.41.2",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "event-management-backend",
"version": "1.41.1",
"version": "1.41.2",
"hasInstallScript": true,
"dependencies": {
"@prisma/adapter-pg": "^7.10.1",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "event-management-backend",
"version": "1.41.1",
"version": "1.41.2",
"description": "Event Management System Backend",
"main": "src/index.js",
"scripts": {
+7 -1
View File
@@ -247,8 +247,14 @@ async function runNow(name) {
async function jobStatus(prisma) {
const recent = new Map();
if (mode === 'queue') {
// pg-boss columns are timestamptz, and Prisma's pg adapter drops their offset in raw queries
// (10:55+02 came back as 10:55Z). As plain UTC timestamps they come back right.
const rows = await prisma.$queryRawUnsafe(`
SELECT name, state, created_on AS "createdOn", started_on AS "startedOn", completed_on AS "completedOn", output
SELECT name, state,
created_on AT TIME ZONE 'UTC' AS "createdOn",
started_on AT TIME ZONE 'UTC' AS "startedOn",
completed_on AT TIME ZONE 'UTC' AS "completedOn",
output
FROM (
SELECT name, state, created_on, started_on, completed_on, output,
row_number() OVER (PARTITION BY name ORDER BY created_on DESC) AS rn
+2 -1
View File
@@ -1,6 +1,6 @@
# Handover — where things stand and how to carry on
Last updated: 2026-10-27, after **1.41.1** (and Hub 1.0.0). The plan itself is in
Last updated: 2026-10-27, after **1.41.2** (and Hub 1.0.0). The plan itself is in
[ROADMAP-v2.md](./ROADMAP-v2.md) (decisions table at the end); the previous round of
features is in [FEATURES-ROUND-1.md](./FEATURES-ROUND-1.md).
@@ -8,6 +8,7 @@ features is in [FEATURES-ROUND-1.md](./FEATURES-ROUND-1.md).
| Version | What |
|---------|------|
| 1.41.2 | Background jobs page: last-run times were 2 h ahead (Prisma's pg adapter drops the offset of timestamptz in raw queries — read pg-boss times `AT TIME ZONE 'UTC'`); `APP_TIMEZONE` documented |
| 1.41.1 | Licence fixes — no licence (never connected, or the Hub answers `INSTALL_NOT_FOUND`, which now drops the old licence) is read-only like suspended; read-only also blocks editing events/options/variants; heartbeat 30 s after start and after connecting; `LICENCE_CHECK_DISABLED` for e2e |
| 1.41.0 | Hope Events Hub connection — licence step in `/setup` and Site settings → Licence, 15-minute heartbeat (health, totals, income bands), licence states checked offline (grace banner for site admins only, read-only when suspended/revoked), `/health`, "update available", `scripts/install.sh`. The Hub itself is `joshua/events-hub` 1.0.0 |
| 1.40.0 | POPIA toolkit part 3 — readiness checklist with score, retention policies + nightly `retention` job (inactive accounts anonymised after 5 years with a 30-day warning, on by default), breach register with notification drafts, children's/medical flag in the access log, `{retention}` in the notice |
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "hope-events-frontend",
"version": "1.41.1",
"version": "1.41.2",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "hope-events-frontend",
"version": "1.41.1",
"version": "1.41.2",
"dependencies": {
"@dnd-kit/core": "^6.3.1",
"@hookform/resolvers": "^5.2.1",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "hope-events-frontend",
"version": "1.41.1",
"version": "1.41.2",
"private": true,
"scripts": {
"dev": "next dev --turbopack",
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "hope-events",
"version": "1.41.1",
"version": "1.41.2",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "hope-events",
"version": "1.41.1",
"version": "1.41.2",
"license": "ISC",
"devDependencies": {
"@playwright/test": "^1.64.0",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "hope-events",
"version": "1.41.1",
"version": "1.41.2",
"main": "index.js",
"scripts": {
"dev:backend": "cd backend && npm run dev",