Description of problem: The apply button doesn't work and The user has to enter with keyboard to get the filter results. Version-Release number of selected component (if applicable): Red Hat CloudForms Management Engine version 5.10.4 How reproducible: Always when Filter has user input. Steps to Reproduce: 1. Navigate to Compute > Infrastructure > Virtual Machines and select Vm -> All VMs [ Same is the case about Templates ] 2. Create an advanced filter and save it [ The filter should have user input ] eg: Virtual Machine : Power State = <user input> 3. Try to get the Filter results by clicking the ' Apply ' button, which does not work 4. The ' Enter ' keyboard hit does work Actual results: The user has to enter with keyboard to get the filter results. Expected results: The ' Apply ' button should show the filter results. Aditional info: The newly created advanced filter will be visible under My Filters
Created attachment 1575303 [details] Apply Button
https://github.com/ManageIQ/manageiq-ui-classic/pull/5875
New commit detected on ManageIQ/manageiq-ui-classic/master: https://github.com/ManageIQ/manageiq-ui-classic/commit/d25f5ed965d7f75b7f7a094bde4dee564e8258c0 commit d25f5ed965d7f75b7f7a094bde4dee564e8258c0 Author: Martin Hradil <mhradil> AuthorDate: Thu Jul 25 10:47:45 2019 -0400 Commit: Martin Hradil <mhradil> CommitDate: Thu Jul 25 10:47:45 2019 -0400 user_input_filter - don't send Cancel on Apply Since #3444 (which fixed the user input filter modal to hide after Apply): * clicking the apply button triggers a ?button=apply request * but, thanks to data-dismiss="modal", it also closes the modal * BUT, closing the modal this way triggers a ?button=cancel request Thus, clicking apply triggers apply & cancel, in random order. Ideally, we should not be using data-dismiss on the Apply button, but using `$('#quicksearchbox').modal('hide')` in `quick_search_apply_click`, same as in `quick_search_cancel_click`. The problem with that is that this would involve changing every single `replace_right_cell`, or somehow amending their output after the fact. So, leaving the data-dismiss mechanism as is, but: * explicitly adding code to not send the ?button=cancel request when the Apply button was clicked * explicitly triggering hiding the modal when enter was clicked in the form (previously it would just apply) Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1715550 app/assets/javascripts/miq_application.js | 1 + app/controllers/application_controller/filter.rb | 2 + app/views/layouts/_user_input_filter.html.haml | 9 +- 3 files changed, 10 insertions(+), 2 deletions(-)
New commit detected on ManageIQ/manageiq-ui-classic/ivanchuk: https://github.com/ManageIQ/manageiq-ui-classic/commit/3dbfd78b22dac33bd33374afa0b55fa3f3d33df3 commit 3dbfd78b22dac33bd33374afa0b55fa3f3d33df3 Author: Milan Zázrivec <mzazrivec> AuthorDate: Mon Jul 29 10:56:53 2019 -0400 Commit: Milan Zázrivec <mzazrivec> CommitDate: Mon Jul 29 10:56:53 2019 -0400 Merge pull request #5875 from himdel/adv-apply user_input_filter - don't send Cancel on Apply (cherry picked from commit b9568e2f734a510eaddd4167d6729e114df92aea) Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1715550 app/assets/javascripts/miq_application.js | 1 + app/controllers/application_controller/filter.rb | 2 + app/views/layouts/_user_input_filter.html.haml | 9 +- 3 files changed, 10 insertions(+), 2 deletions(-)
*** Bug 1725839 has been marked as a duplicate of this bug. ***
Fixed and verified in 5.11.0.17.20190730152352_93b1c30. Filter with user input produces results when clicking Apply button.