VSN-1990/ use isActive in Mappers to receive only active trips ( affected or not affected )
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 intoDriverTimeSlotNonAffectedDTOs()to safely include only TripCircuits withisActive = true. - Ensured support for
isActivebeingnull→ 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()))
- Added
-
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.