Skip to content

VSN-1990/ use isActive in Mappers to receive only active trips ( affected or not affected )

ilyas makhloul a demandé de fusionner feature/vsn-1990 vers develop

Filter TripCircuits by active status when building DriverTimeSlotDto list

Summary

This MR updates the logic responsible for converting TripCircuit entities into DriverTimeSlotDto objects. The conversion process now includes a filter to ensure that only active TripCircuits (isActive = true) are considered. Inactive circuits are excluded from the resulting DTO list.

Changes Made

  • Added a !Boolean.TRUE.equals() filter in toDriverTimeSlotNonAffectedDTOs() to safely include only TripCircuits with isActive = true.
  • Ensured support for isActive being null → handled safely without throwing NullPointerException.
  • Improved overall data consistency by returning only relevant and active circuits in the UI.

Technical Details

  • Updated Stream pipeline:

    • Added .filter(tc -> !Boolean.TRUE.equals(tc.getIsActive()))
  • No changes to the DTO structure or mapping logic other than filtering.

Impact

  • Users will now only see affected & non-affected time slots for active TripCircuits.
  • Backend processing becomes more robust and predictable.
  • Prevents displaying obsolete or inactive circuits in the planning UI.
Modification effectuée par ilyas makhloul

Rapports de requête de fusion