Bug 1715550 - The ' Apply ' button doesn't work for Advance Filters in CloudForms
Summary: The ' Apply ' button doesn't work for Advance Filters in CloudForms
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.10.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: 5.11.0
Assignee: Martin Hradil
QA Contact: Angelina Vasileva
Red Hat CloudForms Documentation
URL:
Whiteboard:
: 1725839 (view as bug list)
Depends On:
Blocks: 1734122
TreeView+ depends on / blocked
 
Reported: 2019-05-30 16:12 UTC by Khushbu Borole
Modified: 2019-12-13 15:00 UTC (History)
12 users (show)

Fixed In Version: 5.11.0.17
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1734122 (view as bug list)
Environment:
Last Closed: 2019-12-13 15:00:55 UTC
Category: Bug
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Apply Button (97.41 KB, image/png)
2019-05-30 16:15 UTC, Khushbu Borole
no flags Details

Description Khushbu Borole 2019-05-30 16:12:36 UTC
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

Comment 2 Khushbu Borole 2019-05-30 16:15:09 UTC
Created attachment 1575303 [details]
Apply Button

Comment 19 CFME Bot 2019-07-29 15:01:56 UTC
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(-)

Comment 21 CFME Bot 2019-07-29 16:46:02 UTC
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(-)

Comment 22 Brian McLaughlin 2019-07-30 14:39:04 UTC
*** Bug 1725839 has been marked as a duplicate of this bug. ***

Comment 23 Angelina Vasileva 2019-08-05 08:03:33 UTC
Fixed and verified in 5.11.0.17.20190730152352_93b1c30.

Filter with user input produces results when clicking Apply button.


Note You need to log in before you can comment on or make changes to this bug.