Traewelling / traewelling

Free check-in service to log your public transit journeys
https://traewelling.de
GNU Affero General Public License v3.0
225 stars 45 forks source link

Check-In with trains that are late #575

Closed macwinnie closed 1 year ago

macwinnie commented 2 years ago

Describe the bug

Today ICE 526 was late (+65 when leaving MH) and could be reached by ICE 789.

Checkin was not permitted.

Expected behavior Checkin should have been permitted.

Screenshots

0C62E193-1B24-4A1E-898F-74E60D01A546

Smartphone (please complete the following information):

karlbeecken commented 2 years ago

According to my research, this issue is caused by comparing the planned departure/arrival times instead of the real-time data in this function. A dirty fix would be to increase the tolerance (currently at 10 minutes, maybe push it up to 60) but this would defeat the purpose of this function. To fix this issue in a nice way, the real-time data is needed in this function. As I'm only beginning to look through the code, I have no idea how to get the data there, maybe someone from the team can help by hitting me up with the right information or just fixing this real quick, as this shouldn't be the greatest hassle.

MrKrisKrisu commented 1 year ago

Our backend can now force checkins. This can already be used via the API. The frontend has not yet implemented this possibility.

https://github.com/Traewelling/traewelling/blob/18f2d105cb6c22b5ef20450ef72cd35dc6982db6/app/Http/Controllers/Backend/Transport/TrainCheckinController.php#L61