Fix: Downtimes/Comments not being synced to child zones

fixes #11227
This commit is contained in:
Michael Friedrich 2016-03-29 12:09:51 +02:00 committed by Gunnar Beutner
parent 0d2ae5ce92
commit d0b5898c46
2 changed files with 10 additions and 0 deletions

View File

@ -175,6 +175,11 @@ String Comment::AddComment(const Checkable::Ptr& checkable, CommentType entryTyp
if (service)
attrs->Set("service_name", service->GetShortName());
String zone = checkable->GetZoneName();
if (!zone.IsEmpty())
attrs->Set("zone", zone);
String config = ConfigObjectUtility::CreateObjectConfig(Comment::TypeInstance, fullName, true, Array::Ptr(), attrs);
Array::Ptr errors = new Array();

View File

@ -223,6 +223,11 @@ String Downtime::AddDowntime(const Checkable::Ptr& checkable, const String& auth
if (service)
attrs->Set("service_name", service->GetShortName());
String zone = checkable->GetZoneName();
if (!zone.IsEmpty())
attrs->Set("zone", zone);
String config = ConfigObjectUtility::CreateObjectConfig(Downtime::TypeInstance, fullName, true, Array::Ptr(), attrs);
Array::Ptr errors = new Array();