Description of problem: Hi, when trying to search events in API/UI with template.name filter either returns an empty list or SQL error. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. Request events with some specific template.name 2. 3. Actual results: Empty list or SQL error Expected results: Filtred list of events Additional info:
search engine problem query generated : SELECT * FROM (( SELECT distinct audit_log.* FROM audit_log LEFT OUTER JOIN vms_with_tags ON audit_log.vm_id=vms_with_tags.vm_guid LEFT OUTER JOIN vm_templates_storage_domain ON vms.vmt_guid=vm_templates_storage_domain.vmt_guid <<<==== problem is here , vms.vmt_guid instead of vms_with_tags.vmt_guid, there is no vms view in this search query WHERE vm_templates_storage_domain.name ILIKE 'a' AND not deleted) ORDER BY audit_log_id DESC ) as T1 OFFSET (1 -1) LIMIT 100 related to : https://gerrit.ovirt.org/#/c/ovirt-engine/+/112551/ (not a regression but seems that this case of 2 LEFT OUTER JOIN was not covered with this fix) probably corner case , first LEFT OUTER JOIN using vms_with_tags correctly while the second LEFT OUTER JOIN uses wrong vms instead of vms_with_tags