Skip to main content

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

  1. Record the non-sensitive date range and resulting day count.
  2. Compare the effective policy's exclusion concepts and the tenant calendar through approved reads.
  3. 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.

Source References

  • microservices/src/leave-service/Domain/Leave/LeaveDayCalculator.cs
  • microservices/src/leave-service/Domain/Leave/LeaveConfig.cs
  • microservices/src/leave-service/Application/LeaveWorkflows.cs

See Also

Keywords

  • Leave troubleshooting
  • Troubleshoot Leave Day Calculation
  • Safe diagnostics

Revision Information

  • Status: Draft
  • Last reviewed: 2026-07-15
  • Review cycle: Quarterly