diff --git a/doc/82-Changelog.md b/doc/82-Changelog.md index 627dcb61..a6015798 100644 --- a/doc/82-Changelog.md +++ b/doc/82-Changelog.md @@ -11,6 +11,9 @@ v1.10.2 (unreleased) * You can find issues and feature requests related to this release on our [roadmap](https://github.com/Icinga/icingaweb2-module-director/milestone/31?closed=1) +### UI +* FIX: modifying single timeperiod ranges had no effect (#2525) + ### Import and Sync * FIX: triggering Sync manually produced an error on PostgreSQL (#2636) diff --git a/library/Director/Db/Branch/BranchedObject.php b/library/Director/Db/Branch/BranchedObject.php index 8130137e..0f276c21 100644 --- a/library/Director/Db/Branch/BranchedObject.php +++ b/library/Director/Db/Branch/BranchedObject.php @@ -267,14 +267,14 @@ class BranchedObject if ($this->object->hasProperty('object_type')) { $branched->set('object_type', $this->object->get('object_type')); } + $branched->set('id', $this->object->get('id')); + $branched->set('uuid', $this->object->get('uuid')); foreach ((array) $this->object->toPlainObject(false, true) as $key => $value) { if ($key === 'object_type') { continue; } $branched->set($key, $value); } - $branched->set('id', $this->object->get('id')); - $branched->set('uuid', $this->object->get('uuid')); } else { $branched = DbObjectTypeRegistry::newObject($this->objectTable, [], $connection); $branched->setUniqueId($this->objectUuid); diff --git a/library/Director/Objects/IcingaRanges.php b/library/Director/Objects/IcingaRanges.php index b5b5647c..c14c5883 100644 --- a/library/Director/Objects/IcingaRanges.php +++ b/library/Director/Objects/IcingaRanges.php @@ -141,7 +141,7 @@ abstract class IcingaRanges } else { $class = $this->getRangeClass(); $this->ranges[$range] = $class::create([ - $this->objectIdColumn => $this->object->id, + $this->objectIdColumn => $this->object->get('id'), 'range_key' => $range, 'range_value' => $value, ]);