diff --git a/lib/Travelynx/Command/database.pm b/lib/Travelynx/Command/database.pm index 4b832087042778701a28304e1249c85a392ecfd4..a42f2f57301ffa2d1d53157c08070e412727682d 100644 --- a/lib/Travelynx/Command/database.pm +++ b/lib/Travelynx/Command/database.pm @@ -1287,6 +1287,19 @@ my @migrations = ( } ); }, + + # v30 -> v31 + # travelynx v1.29.17 introduces links to conflicting journeys. + # These require changes to statistics data. + sub { + my ($db) = @_; + $db->query( + qq{ + truncate journey_stats; + update schema_version set version = 31; + } + ); + }, ); sub sync_stations { diff --git a/lib/Travelynx/Model/Journeys.pm b/lib/Travelynx/Model/Journeys.pm index defff0ba416893480c4fd303e166d1367bfa4868..1239266e93b04009d2dfc2d4287dfd3150c0dde0 100755 --- a/lib/Travelynx/Model/Journeys.pm +++ b/lib/Travelynx/Model/Journeys.pm @@ -1486,8 +1486,14 @@ sub compute_stats { and $next_departure - $journey->{rt_arr_ts} < ( 60 * 60 ) ) { if ( $next_departure - $journey->{rt_arr_ts} < 0 ) { - push( @inconsistencies, - epoch_to_dt($next_departure)->strftime('%d.%m.%Y %H:%M') ); + push( + @inconsistencies, + [ + epoch_to_dt($next_departure) + ->strftime('%d.%m.%Y %H:%M'), + $journey->{id} + ] + ); } else { $interchange_real diff --git a/sass/src/common/index.scss b/sass/src/common/index.scss index b66c425966b0c1a874083075d2fd62302e9b86bd..b2d31876c039061c28926db3e54657cb382dd705 100644 --- a/sass/src/common/index.scss +++ b/sass/src/common/index.scss @@ -22,6 +22,10 @@ a.unmarked { color: $off-black; } +.white-text a { + color: #eeeeff; +} + div.targetlist { display: grid; grid-template-columns: 1fr max-content; diff --git a/templates/_history_stats.html.ep b/templates/_history_stats.html.ep index 86a3c94e2410c156fa4a9fbc12c1b175c4496aa9..4d702a1a94e928b87751f07afaf33d2e8290f1af 100644 --- a/templates/_history_stats.html.ep +++ b/templates/_history_stats.html.ep @@ -10,8 +10,8 @@ vorherigen Zugfahrt und wurden bei der Wartezeitberechnung ignoriert. <ul> - % for my $date (@{$stats->{inconsistencies}}) { - <li><%= $date %></li> + % for my $field (@{$stats->{inconsistencies}}) { + <li><a href="/journey/<%= $field->[1] %>"><%= $field->[0] %></a></li> % } </ul> </p>