From 32b71c922cc6224eecdedca4f8802de87e6a652a Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Thu, 14 Feb 2019 23:11:45 +0100 Subject: [PATCH] IcingaCloneObjectForm: fix cloning to another Set fixes #1758 --- application/forms/IcingaCloneObjectForm.php | 7 +++++++ doc/82-Changelog.md | 1 + 2 files changed, 8 insertions(+) diff --git a/application/forms/IcingaCloneObjectForm.php b/application/forms/IcingaCloneObjectForm.php index f8de01ac..05ce44b4 100644 --- a/application/forms/IcingaCloneObjectForm.php +++ b/application/forms/IcingaCloneObjectForm.php @@ -114,6 +114,13 @@ class IcingaCloneObjectForm extends DirectorForm $new->set('object_type', 'object'); } + if ($set = $this->getValue('target_service_set')) { + $new->set( + 'service_set_id', + IcingaServiceSet::loadWithAutoIncId((int) $set, $connection)->get('id') + ); + } + $services = []; $sets = []; if ($object instanceof IcingaHost) { diff --git a/doc/82-Changelog.md b/doc/82-Changelog.md index a06c07d5..31806f69 100644 --- a/doc/82-Changelog.md +++ b/doc/82-Changelog.md @@ -20,6 +20,7 @@ before switching to a new version. * FIX: Loop detection works again (#1631) * FIX: Snapshots for Baskets with Dependencies are now possible (#1739) * FIX: Commands snapshots now carry fields in your Basket (#1747) +* FIX: Cloning services from one Set to another one no longer fails (#1758) * FEATURE: Add TimePeriod support to Configuration Baskets (#1735) * FEATURE: RO users could want to see where a configured service originated (#1785)