Bug #25663
openForeman Search "list" syntax with Params does not work
Description
When using a "list" (^) to search foreman. Correct syntax is something along the lines of:
name ^ (host1.my.lan, host2.my.lan)
When searching a built in item (name, environment, hostgroup, etc.) this works as expected.
However - when attempting to search a parameter in the same fashion this leads to errors about invalid MYSQL statements.
params.param1 ^ (stuff, things, stuff2)
external method 'search_by_params' failed with error: Mysql2::Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''stuff,things,stuff2') ORDER BY `parameters`.`priority` ASC' at line 1: SELECT `parameters`.* FROM `parameters` WHERE (name = 'param1' and value IN 'stuff,things,stuff2') ORDER BY `parameters`.`priority` ASC
Expected result:
Foreman Searching using list syntax should function as expected for params (and fact) searches.
No data to display