Skip to content

Conversation

@t2gran
Copy link
Member

@t2gran t2gran commented Jan 28, 2026

Summary

When listing departures, some of the departures having a service date prior to the requested date is missing in the departure board listing.

The fix also account for DST. I have

Issue

Fixes #7249

Unit tests

✅ New unit tests are added to the complicated date calculation logic and to some of the business features methods.

Documentation

✅ Java doc is updated

Changelog

✅ This is relevant for the change log.

Bumping the serialization version id

✅ Bumping is necessary since the TripPattern changed.

@t2gran t2gran added this to the 2.9 (next release) milestone Jan 28, 2026
@t2gran t2gran requested a review from a team as a code owner January 28, 2026 16:52
@t2gran t2gran added !Bug Apply to issues describing a bug and PRs witch fixes it. +Bump Serialization Id Add this label if you want the serialization id automatically bumped after merging the PR Entur Test This is currently being tested at Entur labels Jan 28, 2026
@codecov
Copy link

codecov bot commented Jan 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.12%. Comparing base (4639397) to head (04d355b).
⚠️ Report is 25 commits behind head on dev-2.x.

Additional details and impacted files
@@              Coverage Diff              @@
##             dev-2.x    #7250      +/-   ##
=============================================
- Coverage      72.15%   72.12%   -0.03%     
  Complexity     21089    21089              
=============================================
  Files           2297     2297              
  Lines          85218    85238      +20     
  Branches        8483     8489       +6     
=============================================
- Hits           61487    61476      -11     
- Misses         20753    20781      +28     
- Partials        2978     2981       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

}

@ParameterizedTest
@CsvSource(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice usage of CsvSource.

Copy link
Member

@leonardehrenfried leonardehrenfried left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an elegant solution this problem and ready to be merged, IMO, but please consider my typo fixes.

Co-authored-by: Leonard Ehrenfried <[email protected]>
Comment on lines +158 to +159
/// - 29. March 2026 02:00 -> 03:00 First summer day start at 23:00, 1h overlap
/// - 25. October 2026 03:00 -> 02:00 Fist winter day start at 01:00, 1h gap
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// - 29. March 2026 02:00 -> 03:00 First summer day start at 23:00, 1h overlap
/// - 25. October 2026 03:00 -> 02:00 Fist winter day start at 01:00, 1h gap
/// - 29. March 2026 02:00 -> 03:00 First summer service-day start at 23:00, 1h overlap
/// - 25. October 2026 03:00 -> 02:00 Fist winter service-day start at 01:00, 1h gap

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also fist -> first

Copy link
Member

@leonardehrenfried leonardehrenfried left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is one spelling mistake (fist -> first) but you can fix that on dev-2.x if you wish.


// Adjust for overlapping service-days. This happens when we go from winter-time to summer time.
if (t1.getHour() == 23 && t1.plusHours(12).getHour() == 12) {
ld1 = ld1.plusDays(1);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't you decrease ld0 in a corresponding way if any of the days from ld0 - 1 until t0 - 1 are 23 hour days?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

!Bug Apply to issues describing a bug and PRs witch fixes it. +Bump Serialization Id Add this label if you want the serialization id automatically bumped after merging the PR Entur Test This is currently being tested at Entur

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Departures are missing from the departure board for Kystruten/Havila

4 participants