fix: backdate rundown start when rolling

This commit is contained in:
Carlos Valente
2026-03-08 00:41:07 +01:00
committed by Carlos Valente
parent 5ff7861968
commit 6f1f10ccff
10 changed files with 235 additions and 31 deletions
@@ -16,6 +16,7 @@ import {
Trigger,
URLPreset,
ViewSettings,
Day,
} from 'ontime-types';
import {
customFieldLabelToKey,
@@ -393,7 +394,7 @@ export function migrateRundown(
// !==== RUNTIME METADATA ====! //
revision: -1,
delay: 0,
dayOffset: 0,
dayOffset: 0 as Day,
gap: 0,
});
} else if (entry.type === 'block') {
@@ -16,6 +16,7 @@ import {
isOntimeMilestone,
OntimeMilestone,
OntimeGroup,
Day,
} from 'ontime-types';
import {
isObjectEmpty,
@@ -281,7 +282,7 @@ function processEntry<T extends OntimeEntry>(
sanitiseCustomFields(customFields, currentEntry);
processedData.totalDays += calculateDayOffset(currentEntry, processedData.previousEvent);
currentEntry.dayOffset = processedData.totalDays;
currentEntry.dayOffset = processedData.totalDays as Day;
currentEntry.delay = 0; // this means we dont calculate delays or gaps for skipped events
currentEntry.gap = 0; // this means we dont calculate delays or gaps for skipped events
currentEntry.parent = childOfGroup;