Skip to content

Commit

Permalink
IcingaCloneObjectForm: allow fields for Commands
Browse files Browse the repository at this point in the history
fixes #2264
  • Loading branch information
Thomas-Gelf committed Nov 15, 2022
1 parent a1e589c commit 071df2a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion application/forms/IcingaCloneObjectForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
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;
Expand Down Expand Up @@ -95,7 +96,9 @@ public function setup()
}
}

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(
Expand Down
3 changes: 3 additions & 0 deletions doc/82-Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 071df2a

Please sign in to comment.