Created attachment 1515311 [details] bug demo on report filter tab Description of problem: Advanced search filter fails when different conditions(AND|OR|NOT) are used. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. Copy an existing report or create a new report. 2. Fill in required details and go to the Filters tab. 3. Add filter in the following order: `condition1 AND condition2 AND condition3 OR condition4` Actual results: condition4 would not add and the form would render useless. Try clicking on `commit` or `discard, nothing would work. Even if the report is saved with such filter, queuing the report would generate error. Expected results: User should be able to use as many conditions as they require. Additional info: - This problem is affecting all the areas where advanced search filter is used. - This issue exists on 5.9 as well.
Created attachment 1515312 [details] bug demo on infra provider page
Created attachment 1515313 [details] Production log when faulty filter on infra provider page is loaded
Because of the way the code at https://github.com/ManageIQ/manageiq-ui-classic/blob/master/app/controllers/application_controller/filter.rb#L549 is structured, I don't believe this is supported. I'm not sure what the correct procedure here is but I think it requires someone from the UI team to be involved in determining how we should handle this.
The backend issue is fixed here: https://github.com/ManageIQ/manageiq/pull/18709 It'll still require UI work per comment 8
https://github.com/ManageIQ/manageiq/pull/18867
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/070d1436958f72c9b9694b17d93d4602c42016eb commit 070d1436958f72c9b9694b17d93d4602c42016eb Author: Harpreet Kataria <hkataria> AuthorDate: Thu Jun 13 17:58:54 2019 -0400 Commit: Harpreet Kataria <hkataria> CommitDate: Thu Jun 13 17:58:54 2019 -0400 assign value to a variable and return at the end. Fixed `exp_find_by_token` method to return values correctly when finding token within an expression with mixed operators Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1660460 lib/miq_expression/subst_mixin.rb | 14 +- spec/lib/miq_expression/subst_mixin_spec.rb | 34 + 2 files changed, 43 insertions(+), 5 deletions(-)
CFME 5.11.0.10.20190619171116_239686f I am able to construct such filter but it still produces an error. steps: 1. Go to VMs 2. Created advanced filter: ( Virtual Machine : Name = "linux" and ( Virtual Machine.My Company Tags : Environment CONTAINS 'Development' or Virtual Machine.My Company Tags : Environment CONTAINS 'Test' ) ) - it's good, now I am able to construct such filter 3. Save the filter with the name "bz" 4. Close the advanced search 5. Select your new advanced search from "My Filters" Get the error as in the attachment (Data operator 'token' is not supported [vm_infra/explorer]).
Created attachment 1582548 [details] error in 5.11.0.10
Unfortunately, I don't have this appliance anymore and I couldn't reproduce it in a new one. Therefore, marking as VERIFIED for 5.11.0.10.20190619171116_239686f.