Skip to content

Resolve VSN-2064 "Feature/integrate passenger absence management in trip generation and recalculation"

Oussama Toumi a demandé de fusionner feature/VSN-2064 vers develop
  • Add AbsenceService.getPassengerAbsencesByUuidAndPeriod() to fetch absences from Absence MS
  • Implement week parity calculation in DateUtils (getWeekParity, hasOverlappingWeekTypeAndDays) to filter absences based on trip week type and days
  • Configure trip generation to associate passenger absences with trip points
  • Add automatic trip recalculation when passengers are absent on current date via initializeTripsWithAbsenceData() and supporting methods
  • Overload TripPointService.generateTripPoints() with two variants:
    • One accepting AmendmentCircuit for initial generation (fetches absences from MS)
    • One accepting existing AbsencePeriod map for recalculation (preserves absences)
  • Add utility methods in TripPointUtils:
    • hasPassengerAbsentOnDate(): check if any passenger is absent on a given date
    • isDateInAbsencePeriod(): verify if date falls within absence period
    • extractAbsencesByPassengerUuid(): build map of absences by passenger UUID
  • Filter absences by trip direction (Outbound/Return) and validate overlap with trip schedule
  • Set nextRecalculationDate for trips with upcoming absences

This enables dynamic trip recalculation based on passenger availability while avoiding redundant MS calls during recalculation by preserving existing absence data.

Closes VSN-2064

Rapports de requête de fusion