icingaweb2-module-director
icingaweb2-module-director copied to clipboard
Custom field array not parsed in "Show based on filter"
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):
-
and and another new custom field (data type doesn't matter for this bug):
-
Add the array field as new custom field to a host template (step3.png):
-
Add the second custom field to the host template with "Show based on filter $array=true"
-
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
-
Add "1", "01", "001" etc: The second field is displayed
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