Missing Calendar course information

The existing auto_add_today_enrolments_to_calendar job also checks descriptions of existing upcoming Google Calendar events. Its schedule is unchanged; the seeded schedule is every three hours in Asia/Singapore. Runtime enablement and timings remain the existing scheduler_config values. This adds no scheduler job and does not alter Google Apps Script source, triggers or business ownership.

Description format

Course Title: Business Innovation with Agentic AI and AI Agents
Course Code: TGS-2023037472
Course Run ID: 1449949

*Auto-generated by LMS; Updated: 23 Nov 2026, 3:00 PM SGT*

The shared enrichment helper fills each missing or placeholder field separately. It preserves populated titles, recognised historical course codes, notes, HTML and meeting links. A different populated run ID or unrelated course code is a conflict. When information changes, the helper replaces the legacy LMS footer with one Singapore-time update stamp. An unchanged check does not add/change a timestamp. Partial source information can be completed later without inserting N/A. The existing ensure/reconcile, trainer confirmation, and CA/DA event-creation paths use the same formatting helper.

Existing job and source-sync integration

The description pass is independent of the original enrolment/event-creation sweep. It checks the next 365 days, including future events of ongoing classes, without requiring learners, trainers or local sessions for a mapped event. All Calendar pages are collected before matching. The pass changes descriptions only: it cannot create events, adopt mappings, modify dates/times, add/remove attendees or generate meetings. It uses the configured tenant Calendar and existing Calendar write guards, with sendUpdates: 'none'. It retains compatibility with the separate, unfinished operational writer’s ownership fence without deploying or enabling that work.

The pass is scoped to TGS classes and writes only real numeric run IDs. A mapped class can receive title/code first and its run ID later; staged/internal IDs are never emitted by this pass. C-code/MMS classes are not assigned SSG IDs. Course-code history is recognised, and the run’s code uses the existing run-specific SSG/date resolver rather than assuming the course’s latest reference applies to every run.

An existing exact event mapping must agree with its mapped date, active run and course/ID evidence. Unmapped events require a unique compatible course-code and teaching-date match, or an already recorded unique run ID with compatible dates. Without local sessions, an unmapped series must have observed first/last dates matching the run boundaries. Title similarity and mode alone are not identity proof; an SSG Classroom designation is not used to reject a virtual Calendar class. Ambiguity is held for review. Historical-only events are left unchanged.

Successful SSG imports, upcoming-run synchronisation and session gap-fill also request a best-effort refresh for the affected run. These checks are serialized and duplicate pending run requests are coalesced. They use the same helper and target only the run’s date range. The existing three-hour job catches interrupted background work; no new schedule or durable queue is introduced.

Each update holds the existing per-run lock, re-reads the source and Google event, and submits an If-Match version condition. A version conflict is deferred rather than blindly retried. Readback must match before an update is counted successful. If an operational ownership fence is installed, queued legacy intentions are not reported as completed writes. Operational managed description blocks are left to their existing owner. This release does not install or enable that separate writer.

Job results include courseInfo with scanned, updated, unchanged, conflict, skipped and error counts, plus up to 100 event-level outcomes. A source/Calendar failure in this pass does not block the existing enrolment processing. The pass runs before the SSG enrolment request so an upstream enrolment timeout does not prevent description enrichment; its results are logged even if that later request fails.

Verification and existing automation scope

node --import tsx --test tests/calendar-course-info.test.ts exercises the description merge, timestamp idempotence, partial data, HTML preservation, fully mapped/ongoing classes, ambiguous/changed identities, recurring instances, ownership handling, conditional updates and readback. Its local HTTP transport uses synthetic events only; it never connects to Google or an operational DB.

Before implementation, the dated registry snapshot in scratch/courseware-email-20261117/automation-review.json was inspected alongside docs/google-automations.md, the native scheduler and TMS/MMS routing. The registry describes Add Orders to Calendar as an order-email/event/guest/sheet process, and Courseware Delivery Automation as a Calendar-guest/course-mapping mail process. The registry does not establish their current trigger coverage or country scope. This change enriches the existing native tenant Calendar path; those Google processes, their schedules and the separate non-funded MMS access routing retain their ownership. No production deployment or Google mutation is part of the local verification.


Back to top

Copyright © 2024-2026 Tertiary Infotech Pte Ltd. All rights reserved.

This site uses Just the Docs, a documentation theme for Jekyll.