diff --git a/server/internal/services/statusincidents.go b/server/internal/services/statusincidents.go index 13a636c..e83c054 100644 --- a/server/internal/services/statusincidents.go +++ b/server/internal/services/statusincidents.go @@ -228,6 +228,13 @@ func AppendStatusIncidentUpdate(instanceID, incidentID, status, body, author str set := bson.M{"status": status, "updated_at": upd.At} if status == models.IncidentResolved || status == models.MaintenanceCompleted { set["resolved_at"] = upd.At + } else { + // Reopening via an appended update must clear a previously-set + // resolved_at the same way UpdateStatusIncident does — otherwise a + // resolved incident reopened to "monitoring" keeps a stale resolved_at + // and silently drops off ListStatusIncidentsForPage once started_at + // ages past the since cutoff, because none of its $or clauses match. + set["resolved_at"] = nil } ctx, cancel := spCtx()