icingaweb2-module-director icon indicating copy to clipboard operation
icingaweb2-module-director copied to clipboard

Custom field array not parsed in "Show based on filter"

Open johannesst opened this issue 2 years ago • 0 comments

Expected Behavior

If I add any string to the field arry the custom field is shown

Current Behavior

If I add a string "1","01" to the array etc the custom field is shown but not if "1" is missing in the array.

Possible Solution

As soon as an array field contains one or more objects/strings/values etc the custom field should be available

Steps to Reproduce (for bugs)

  • Define a new custom array field (step1.png): step1

  • and and another new custom field (data type doesn't matter for this bug): step2

  • Add the array field as new custom field to a host template (step3.png): step3

  • Add the second custom field to the host template with "Show based on filter $array=true" step4

  • Create a new host with this template and insert some values into the array, which are not "1",01","001" etc: The second field is not displayed in the director step5

  • Add "1", "01", "001" etc: The second field is displayed step6a step6b step6c

I would expect that in both cases the second variable is shown since in both cases the array is actually set thus true.

Your Environment

  • Director version (System - About): 1.8,1
  • Icinga Web 2 version and modules (System - About): 2.9.5 Git commit 053971c99dc1a4510beb64a888ea695cc14032dc
  • Icinga 2 version (icinga2 --version): r2.13.2-1
  • Operating System and version: "Ubuntu 20.04.4 LTS"
  • Webserver, PHP versions: Apache/2.4.41 PHP 7.4.3

johannesst avatar Aug 09 '22 07:08 johannesst