mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-21 14:36:31 +00:00
fix(journey): a place kept across two days is two days of the journal
The sync engine keyed a skeleton by source_place_id alone, so a stop standing on two days — the city you land in at dusk and walk through the next morning — got one entry on the first of them and nothing on the rest. Key on the day assignment instead. The assignment row rather than the day, because moving a stop updates day_assignments.day_id in place: keyed this way an entry follows the move instead of reading as one stop leaving the plan and another arriving. Existing rows are backfilled to the place's earliest assignment, and reconciliation adopts an unlinked row rather than annotating it out from under its author. Fixes #2329
This commit is contained in:
@@ -391,6 +391,12 @@ export interface JourneyEntry {
|
||||
journey_id: number;
|
||||
source_trip_id?: number | null;
|
||||
source_place_id?: number | null;
|
||||
/**
|
||||
* The `day_assignments` row this entry was derived from (#2329). A place standing
|
||||
* on two days is two entries, and only this tells them apart. May dangle: an
|
||||
* unassigned stop keeps the id so reconciliation can see the assignment is gone.
|
||||
*/
|
||||
source_assignment_id?: number | null;
|
||||
author_id: number;
|
||||
type: 'entry' | 'checkin' | 'skeleton';
|
||||
title?: string | null;
|
||||
|
||||
Reference in New Issue
Block a user