Openstatus www.openstatus.dev

fix: unresolved reports

+5 -1
+5 -1
packages/api/src/router/statusPage.utils.ts
··· 153 153 const updates = report.statusReportUpdates.sort( 154 154 (a, b) => a.date.getTime() - b.date.getTime(), 155 155 ); 156 + if (updates.length === 0) return; 157 + 156 158 const firstUpdate = updates[0]; 157 159 const lastUpdate = updates[updates.length - 1]; 158 - if (!firstUpdate?.date || firstUpdate.date < pastThreshod) return; 160 + 161 + // NOTE: we don't check threshold here because we display all unresolved reports 162 + if (!firstUpdate?.date) return; 159 163 160 164 // HACKY: LEGACY: we shouldn't have report.status anymore and instead use the update status for that. 161 165 // Ideally, we could replace the status with "downtime", "degraded", "operational" to indicate the gravity of the issue