Icinga / icingaweb2-module-businessprocess

Create top-level views of your applications in a graphical editor. Rules express dependencies between existing hosts and services and let you alert on application level. Business processes are displayed in a tree or list overview.

Home Page:https://icinga.com/docs/businessprocess/latest

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

D&D for subprocess doesn't work

yhabteab opened this issue · comments

Describe the bug

Trying to reorder the children that also contain a subprocess results to this error:
Bildschirmfoto 2023-08-15 um 09 56 18

How to reproduce

  1. Create a top-level process
  2. Add some children
  3. Store the config
  4. Add a new process as a subprocess
  5. Try to reorder the new created subprocess

This error occurs when the ID of the newly added subprocess is an int (step 4 above).

NodeMoveAction::applyTo() uses array_merge(), which reset array key if $name is int.

https://github.com/Icinga/icingaweb2-module-businessprocess/blob/master/library/Businessprocess/Modification/NodeMoveAction.php#L171-L175