Icinga/icingaweb2-module-businessprocess

D&D for subprocess doesn't work

Opened this issue · 2 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