Bug 1670472

Summary: Filters first save button triggers saving of filter
Product: Red Hat CloudForms Management Engine Reporter: Matouš Mojžíš <mmojzis>
Component: UI - OPSAssignee: Milan Zázrivec <mzazrivec>
Status: CLOSED ERRATA QA Contact: Angelina Vasileva <anikifor>
Severity: medium Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: medium    
Version: 5.10.0CC: bmidwood, dmetzger, hkataria, lavenel, mpovolny, mshriver, obarenbo, simaishi
Target Milestone: GA   
Target Release: 5.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.11.0.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-12-12 13:35:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: Bug
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Embargoed:

Description Matouš Mojžíš 2019-01-29 15:37:45 UTC
Description of problem:

It looks like "Save" button which should redirect to Save form already triggers saving and fails because filter name is not defined yet.


Version-Release number of selected component (if applicable):
5.10.0.32

How reproducible:
Always

Steps to Reproduce:
1. Go to Advanced search
2. Commit expression element
3. Select Save

Actual results:
It redirects to Save form.
In log is for new filter:
[----] E, [2019-01-29T10:35:33.713758 #15235:10937a0] ERROR -- : MIQ(vm_infra_controller-adv_search_button): Search Name is required

For already created filter:
[----] E, [2019-01-29T09:32:13.989459 #15235:10937a0] ERROR -- : MIQ(vm_infra_controller-adv_search_button): Name has already been taken

Expected results:


Additional info:

Comment 3 CFME Bot 2019-02-28 16:41:14 UTC
New commit detected on ManageIQ/manageiq-ui-classic/master:

https://github.com/ManageIQ/manageiq-ui-classic/commit/d6028b8d5535e82250a454f048a63a02f4e3a469
commit d6028b8d5535e82250a454f048a63a02f4e3a469
Author:     Milan Zazrivec <mzazrivec>
AuthorDate: Mon Feb  4 05:44:56 2019 -0500
Commit:     Milan Zazrivec <mzazrivec>
CommitDate: Mon Feb  4 05:44:56 2019 -0500

    Advanced Search Save: don't create unnecessary flash message

    https://bugzilla.redhat.com/show_bug.cgi?id=1670472

 app/controllers/application_controller/advanced_search.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comment 4 Mike Shriver 2019-07-02 13:45:51 UTC
Tested in CFME 5.11.0.11.20190625161125_392c61e

There are no evm errors logged when the advanced search expression has been committed and the first 'Save' button has been clicked.  This cleanly redirects the modal to the form for naming the advanced search.

If the user then attempts to save the advanced search filter without naming it, the error is logged for search name required, and a flash message is displayed.

Comment 6 errata-xmlrpc 2019-12-12 13:35:20 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:4199