Skip to content

Commit

Permalink
Merge pull request #5034 from Icinga/fix/ido-downtime-end-5033
Browse files Browse the repository at this point in the history
DB IDO: Fix actual_end_time update for non-triggered flexible downtimes

fixes #5033
  • Loading branch information
dnsmichi committed Feb 24, 2017
2 parents bc486dc + 0dfe571 commit a63a188
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/db_ido/dbevents.cpp
Expand Up @@ -601,8 +601,12 @@ void DbEvents::RemoveDowntimeInternal(std::vector<DbQuery>& queries, const Downt

Dictionary::Ptr fields3 = new Dictionary();
fields3->Set("was_cancelled", downtime->GetWasCancelled() ? 1 : 0);
fields3->Set("actual_end_time", DbValue::FromTimestamp(time_bag.first));
fields3->Set("actual_end_time_usec", time_bag.second);

if (downtime->GetFixed() || (!downtime->GetFixed() && downtime->GetTriggerTime() > 0)) {
fields3->Set("actual_end_time", DbValue::FromTimestamp(time_bag.first));
fields3->Set("actual_end_time_usec", time_bag.second);
}

fields3->Set("is_in_effect", 0);
query3.Fields = fields3;

Expand Down

0 comments on commit a63a188

Please sign in to comment.