Skip to content

HCM v2.1

Latest

Choose a tag to compare

@ritikegov ritikegov released this 11 Sep 04:33
· 2 commits to master since this release
fcb1889

HCM 2.1 — What's Changed

Everything merged into master after the HCM-v2.0 tag (89c74d7, 09 Jan 2026).

Payments — Bill Verification, Transfer & Async Workflow

  • Introduced an end-to-end bill payment pipeline in the Expense service: bill verification, payment transfer, and workflow-driven status transitions for PAYMENTS.BILL and PAYMENTS.BILLDETAILS.
  • Added a DB-backed adaptive scheduler that replaces Kafka task-status polling, with per-detail task isolation, configurable backoff, retry routing, and phase-aware partial indexes.
  • Routed task execution by payment provider through a provider interface; null or invalid providers are explicitly marked VERIFICATION_FAILED.
  • Added MTN provider integration with token caching, balance-check API, phone-number prefixing, and graceful handling of inactive numbers; added a mock MTN mode for non-production environments.
  • Added dual-dispatch routing for bank payments, with field validation for bank-type providers during the verification flow.
  • Added zero-amount bill-detail handling so workers with no payable amount are settled without dispatching a transfer.
  • Added bulk bill status update support, statusCount aggregation on bill search, and multi-status / statusesNot search filters.
  • Added a calculated-bill search API and a bill-detail workflow API for partial updates with full null protection.
  • Added rate limits on bill amounts for both bill create and bill update paths.
  • Added caching for bills, with bill and bill-detail persister topics separated to keep cache invalidation correct.

Payment Advisory & Bill Reporting

  • Added payment advisory generation, extended to support multiple bills in a single advisory.
  • Added a Bill Report module (controller, service, repository, query builder, validator, Kafka consumer) with report status tracking and regeneration on bill update.
  • Added a bill transaction report table and renamed bill report type/columns for consistency.
  • Added Excel-based bulk bill update: template generate and upload APIs, with role and status guards, upload validation, and structured error responses.
  • Removed the hardcoded password on generated Excel sheets and fixed Excel generation inside the Docker container.
  • Added campaign name and project type to bill additional details, and three new amount fields plus an additionalAmountPercent to the Bill model.
  • Migrated payee details from the bill-details table into the party table.
  • Added totalAttendance to BillDetail, enforced PAYMENT_EDITOR / PAYMENT_REVIEWER role-based field access on billdetails/_update, and stripped blocked fields with warnings instead of hard failures.
  • Added email notifications to payment reviewers and approvers, driven by project staff and user roles, with updated HTML templating.

Attendance Report (Muster Roll)

  • Added a full Attendance Report subsystem: report API controller, generator service, Excel generator, Kafka consumer, report metadata / status / format models, and a muster_roll_report table.
  • Added support for generating multiple attendance reports on muster roll create or update, and for downloading generated reports.
  • Integrated Elasticsearch and MDMS for performance data, plus Worker Registry integration for attendee details.
  • Added per-session morning/evening attendance status and signature columns, driven by the SESSION_TYPE field on the attendance log when present.
  • Added role and status localization, alphabetical sorting by attendee name, and a role column on the attendance summary.
  • Added a filestore fallback for signature IDs during report generation.

Attendance Register, Staff & Attendees

  • Added campaign linkage to attendance registers (later switched from campaignId to a human-readable campaignNumber) and a register delete API.
  • Added a Face Auth Event module (API, service, validator, repository, enrichment, multi-tenant Kafka consumer) with its own event table.
  • Publishes a Kafka event to first-attendance-log on the first signature document in attendance log create/update.
  • Added filestore integration for signature data — the filestore ID is stored in additional details instead of raw bytes.
  • Extended register search: multiple service codes, partial/exact service-code matching via isServiceCodeExact, staff name and staff role-type search, and includeStaff / includeAttendee flags to skip enrichment calls.
  • Extended staff and attendee search: username search for campaign managers, pagination, register-ID filtering, and filtering to active registers only.
  • Allowed campaign managers to edit registers they manage before the campaign begins, and to enrol attendees without the reporting-to restriction when first-staff insert is disabled.
  • Enrolment and de-enrolment dates on staff are now honoured as provided and validated against the register period, preserving existing additional details.

Health Expense Calculator & Billing Periods

  • Boundary hierarchy is now sourced dynamically from the campaign instead of static configuration, with a keyed and bounded boundary cache.
  • Billing config and billing periods now sync on campaign date change via the update-project-health Kafka event, with updated period extension logic.
  • Added dynamic worker-rates configuration support and fixed report generation under dynamic wages.
  • Removed the hardcoded DISTRICT boundary level for payments bill creation.
  • Made the billing-period migration schema-safe and self-repairing.

Multi-Tenancy & Platform Hardening

  • Multi-tenant topic pattern support for the Muster Roll status-update and Face Auth event consumers.
  • Fixed central-instance issues in the Expense service and tenant-ID propagation gaps across attendance search, bill status updates, and scheduler paths.
  • Upgraded tracer to 2.9.x with OpenTelemetry across Attendance, Expense, Expense Calculator, Muster Roll, and Health Expense Calculator, replacing manually added DataAccessException handlers with the shared handler.

Build, CI & Security

  • Restructured the GitHub Actions build workflow and moved image builds onto GitHub Actions with multi-arch support.
  • Added an OpenSSF Scorecard workflow.
  • Updated Dockerfiles for VAPT remediation and refreshed the distroless base images (including Java 8).

Documentation & Configuration

  • Updated the Attendance Service OpenAPI spec (Attendance-Service-2.0.0.yaml) and the Expense service contract.
  • Added and updated persisters for Attendance, Muster Roll, Expense, bill payments, and expense tasks.
  • Added localization bundles for payment advisory, payments (en, fr), and the expense template (en_MZ).
  • Refreshed service CHANGELOGs for Attendance, Expense, Expense Calculator, Muster Roll, and Health Expense Calculator.

Bug Fixes

  • Attendance: deleting a register now de-enrols its attendees and active staff, so those people are no longer blocked by ALREADY_ENROLLED_IN_ANOTHER_REGISTER when added to another register.
  • Expense: Total Attendance in the bulk bill Excel is now capped at the bill's billing period across sheet validation, the parser, and BillValidator, preventing inflated per-day wages; reviewer-only fields are gated on the effective update mode so a dual-role user's editor-stage edit is neither offered nor rejected.
  • Muster Roll: attendance report generation is no longer gated on APPROVED, so supervisors can review the sheet before deciding; the report is marked INITIATED before building to avoid stale files, and the muster status is stamped on the sheet when it is not approved.
  • Muster Roll: in-memory muster roll is passed to report generation to fix stale reports after a campaign-supervisor edit; muster rolls can be updated after approval by a proximity supervisor.
  • Muster Roll: fixed individual skill not picking the rate configured in worker rates; fixed billing-period parsing, date/timezone handling, duplicate workers, and intervention analytics date ranges.
  • Expense: fixed bill wages null pointer, stuck bill-detail verification, stuck/failing bill update workflows, partially-failed payment workflows, verification failures when scaling pods, approver email failures, stale report fetches, bill amount re-calculation and sorting, and zero-attendance on bill edit.
  • Attendance: fixed register search, register end date not updating, attendee de-enrolment date preservation on create, and Kafka topic key/configuration issues.

Service Versions

Service Version
attendance 2.0.2
expense 2.0.2
expense-calculator 2.0.4
muster-roll 2.0.2
health-expense-calculator 2.0.1

Database Changes

New tables and migrations added in this release:

  • eg_expense_task, eg_expense_bill_verification_task, eg_expense_bill_transaction_report, eg_expense_scheduler_job (+ partial and phase-aware indexes)
  • muster_roll_report, face_auth_event
  • Column additions: campaignId / campaignNumber on attendance register, totalAttendance on eg_expense_billdetail, payment fields on eg_expense_party, performance columns and role on attendance summary
  • Bill report table and type renames

Commits

Full Changelog: HCM-v2.0...master