]> granicus.if.org Git - icinga2/commitdiff
DB IDO: Fix comment/downtime entry_time reset
authorMichael Friedrich <michael.friedrich@netways.de>
Wed, 15 Jun 2016 09:28:20 +0000 (11:28 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Wed, 15 Jun 2016 09:28:57 +0000 (11:28 +0200)
fixes #11182

lib/icinga/comment.cpp
lib/icinga/downtime.cpp
lib/icinga/downtime.ti

index fd98ae12085596e7883c17cde883faeb19d9ed68..7b91653664b2acb76a3e4fa9cf08b86228aba1cd 100644 (file)
@@ -166,6 +166,7 @@ String Comment::AddComment(const Checkable::Ptr& checkable, CommentType entryTyp
        attrs->Set("text", text);
        attrs->Set("expire_time", expireTime);
        attrs->Set("entry_type", entryType);
+       attrs->Set("entry_time", Utility::GetTime());
 
        Host::Ptr host;
        Service::Ptr service;
index 66b6a635e2cdd454095368667dbc791a27979f72..ee916c284cadf49e132f16287f702920135383d6 100644 (file)
@@ -214,6 +214,7 @@ String Downtime::AddDowntime(const Checkable::Ptr& checkable, const String& auth
        attrs->Set("triggered_by", triggeredBy);
        attrs->Set("scheduled_by", scheduledBy);
        attrs->Set("config_owner", scheduledDowntime);
+       attrs->Set("entry_time", Utility::GetTime());
 
        Host::Ptr host;
        Service::Ptr service;
index 5c7a19bdd55eca588fe944f9ee38b37ebf7d211f..29248cc160c9c1124524fa7e36df0962301ea5fe 100644 (file)
@@ -66,7 +66,7 @@ class Downtime : ConfigObject < DowntimeNameComposer
                }}}
        };
 
-       [state] double entry_time {
+       [config] double entry_time {
                default {{{ return Utility::GetTime(); }}}
        };
        [config, required] String author;