Troubleshoot Leave Day Calculation
Summary
Safe triage for zero or unexpected calculated Leave days.
Audience
Employees or administrators affected by the scenario, first-line support, QA, service owners, and architects.
Symptoms
Calculated days are zero or differ from the expected inclusive range/calendar result.
Scope
Date order, holiday and weekly-off exclusion switches, tenant calendar data, and calculator use.
Cause
The cause must be confirmed from current state and source-backed evidence.
Likely causes
- Reversed/invalid range
- Holiday or weekly-off exclusion settings
- Missing, stale, or differently owned calendar data
- Compatibility and extracted-service policy parity difference
Safe diagnostic steps
- Record the non-sensitive date range and resulting day count.
- Compare the effective policy's exclusion concepts and the tenant calendar through approved reads.
- Determine whether the direct or compatibility calculation path ran.
Resolution
Correct invalid dates or escalate calendar/policy ownership differences. Do not change calendar data solely to force a request through.
Safe resolution
Use only the resolution above and approved operational processes. Do not modify databases, replay messages, bypass authorization, or repeat ambiguous state-changing actions.
Validation
Use an approved synthetic range with known calendar classification and confirm the expected calculated count.
Evidence to collect
Collect the safe UTC window, route/operation category, response/status category, deployed version, affected scope count, and a correlation identifier. Exclude credentials, tokens, personal Leave details, employee identifiers, payloads, configuration values, and private topology.
Escalation
Leave product/service owner; Attendance/payroll calendar owner when ownership is unclear.
Related documentation
Source References
microservices/src/leave-service/Domain/Leave/LeaveDayCalculator.csmicroservices/src/leave-service/Domain/Leave/LeaveConfig.csmicroservices/src/leave-service/Application/LeaveWorkflows.cs
Related Articles
See Also
Keywords
- Leave troubleshooting
- Troubleshoot Leave Day Calculation
- Safe diagnostics
Revision Information
- Status: Draft
- Last reviewed: 2026-07-15
- Review cycle: Quarterly