IcingaCloneObjectForm: allow fields for Commands

fixes #2264
This commit is contained in:
Thomas Gelf 2022-11-15 15:56:18 +01:00
parent a1e589ce6d
commit 071df2a072
2 changed files with 7 additions and 1 deletions

View File

@ -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(

View File

@ -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)