Rebuild of the Leaves & Absences module, driven by the GACN requirements plus a verified defect study of the current system.

Doc Audience Contents
brd.md Product, implementation, GACN Scope split, user journeys, numbered functional requirements, cross-cutting business rules, traceability matrix, decisions taken
engineering-plan.md Backend + frontend engineers Defect inventory with [file:line](file:line), data model, service boundaries, API surface, stored-procedure work, migration, sequencing, risks

Baseline: core-backend-service origin/staging, web-app working tree, dev stored-procedure dump of 14 Aug 2026 (437 procedures), and a live read/write test on the dev tenant. Line references drift — re-verify against origin/staging per phase.

The three things to know before reading

  1. Leave is a two-layer system. C# owns request creation and edit; T-SQL owns approve, decline, delete, accrual and carry-over (spReviewEmployeeRequest, spDeleteEmployeeRequest, spUpdateEmployeeLeaveBalance). Never conclude a leave behaviour is missing from the C# alone — check ../../pade_stored_procedures.md.
  2. There is a proven live defect. Editing a leave request after it has been declined credits the days a second time. Verified end-to-end on the dev tenant: balance 276 → create 2 days → 274 → decline → 276 → edit the declined request to 1 day → 277. Repeatable, no approver involved. The guard behind it (StatusId > IAPPROVED) appears at seven sites covering every request type.
  3. That defect blocks the feature work. Cancellation, return-for-correction and withdrawal all need new request statuses. Because the faulty guard treats every status above Approved as editable, adding statuses 4–6 to today's code would make those states editable too. Phase 0 gates Phase 3.

Decisions taken — 15 Aug 2026

Question Decision
Is submitted-but-unapproved leave "spent"? Yes — commit at submission, as today. No reserved/consumed split.
Half-days required? No. Requests stay whole-day; monthly accrual rounds cumulatively instead.
Escalation / delegation? No. Out of scope for V2, recorded as a known limitation.
Planning cycle ownership HR opens one company-wide cycle a year; divisions coordinate inside it.
Overlap threshold Headcount, per department, company default; override permission-gated with mandatory reason.
INT truncation of balances on decline/delete By design. Closed, do not re-raise.

Related

Leave V2 — business requirements

Leave V2 — engineering plan