Open RincewindsHat opened 6 months ago
This is a an old limitation now popping up because of the distinction between =
and ~
. It can be bypassed by using either =
or ~
exclusively.
There is no simple fix, I'm afraid. Once we change this, filters such as host.check_interval>=60&host.check_interval<=300
must still return the same results as they do now.
Describe the bug
Some queries using the
~
(tilde) operator return wrong (empty) results when search hosts or services.To Reproduce
Try something like this:
/icingaweb2/icingadb/hosts?host.vars.distro=debian&host.vars.transport_mode~icinga_agent
shows no results/icingaweb2/icingadb/hosts?host.vars.distro~debian&host.vars.transport_mode~icinga_agent
shows the correct results. (Note:=
operator in the first condition vs.~
in the second query)Your Environment
Include as many relevant details about the environment you experienced the problem in.
php --version
): PHP 8.2.18Additional context
When exporting the quries with
&format=sql
I get this diff between the two queries above (diff query-problem.sql.fmt query-tilde-tilde.sql.fmt
):By playing around with some combinations, I noticed, that the
GROUP BY
andHAVING
part seems to be missing from the problematic query.