From 071df2a07245eb1d700082af36ee2ce143f16889 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Tue, 15 Nov 2022 15:56:18 +0100 Subject: [PATCH] IcingaCloneObjectForm: allow fields for Commands fixes #2264 --- application/forms/IcingaCloneObjectForm.php | 5 ++++- doc/82-Changelog.md | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/application/forms/IcingaCloneObjectForm.php b/application/forms/IcingaCloneObjectForm.php index 6ee99ba5..c430d7ca 100644 --- a/application/forms/IcingaCloneObjectForm.php +++ b/application/forms/IcingaCloneObjectForm.php @@ -7,6 +7,7 @@ use Icinga\Exception\IcingaException; use Icinga\Module\Director\Acl; use Icinga\Module\Director\Data\Db\DbObjectStore; use Icinga\Module\Director\Db\Branch\Branch; +use Icinga\Module\Director\Objects\IcingaCommand; use Icinga\Module\Director\Objects\IcingaHost; use Icinga\Module\Director\Objects\IcingaObject; use Icinga\Module\Director\Objects\IcingaService; @@ -95,7 +96,9 @@ class IcingaCloneObjectForm extends DirectorForm } } - if ($this->object->isTemplate() && $this->object->supportsFields()) { + if (($this->object->isTemplate() || $this->object instanceof IcingaCommand) + && $this->object->supportsFields() + ) { $this->addBoolean('clone_fields', [ 'label' => $this->translate('Clone Template Fields'), 'description' => $this->translate( diff --git a/doc/82-Changelog.md b/doc/82-Changelog.md index 3a037de2..1a37d9ef 100644 --- a/doc/82-Changelog.md +++ b/doc/82-Changelog.md @@ -9,6 +9,9 @@ v1.11.0 (unreleased) This version hasn't been released yet +### UI +* FEATURE: allow to clone commands with fields (#2264) + ### Fixed issues * You can find issues and feature requests related to this release on our [roadmap](https://github.com/Icinga/icingaweb2-module-director/milestone/32?closed=1)