mirror of https://github.com/Icinga/icinga2.git
On ScheduledDowntime change: ignore downtimes created before change
... while creating new downtimes. refs #8309
This commit is contained in:
parent
1ee26ac89e
commit
bcc3870f3a
|
@ -240,11 +240,16 @@ void ScheduledDowntime::CreateNextDowntime()
|
|||
}
|
||||
|
||||
double minEnd = 0;
|
||||
auto downtimeOptionsHash (HashDowntimeOptions());
|
||||
|
||||
for (const Downtime::Ptr& downtime : GetCheckable()->GetDowntimes()) {
|
||||
if (downtime->GetScheduledBy() != GetName())
|
||||
continue;
|
||||
|
||||
auto configOwnerHash (downtime->GetConfigOwnerHash());
|
||||
if (!configOwnerHash.IsEmpty() && configOwnerHash != downtimeOptionsHash)
|
||||
continue;
|
||||
|
||||
double end = downtime->GetEndTime();
|
||||
if (end > minEnd)
|
||||
minEnd = end;
|
||||
|
|
Loading…
Reference in New Issue