Bug 1298645 - UI: Advanced Search - Delete button remains enabled after deleting the filter
Summary: UI: Advanced Search - Delete button remains enabled after deleting the filter
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.6.0
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: GA
: 5.6.0
Assignee: Harpreet Kataria
QA Contact: Matouš Mojžíš
URL:
Whiteboard: ui:search:filter
: 1283554 1302450 (view as bug list)
Depends On:
Blocks: 1314434 1320244
TreeView+ depends on / blocked
 
Reported: 2016-01-14 15:57 UTC by Harpreet Kataria
Modified: 2018-04-10 12:00 UTC (History)
11 users (show)

Fixed In Version: 5.6.0.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1314434 (view as bug list)
Environment:
Last Closed: 2016-06-29 15:29:54 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Delete button still enabled (22.98 KB, image/png)
2016-01-14 15:57 UTC, Harpreet Kataria
no flags Details
AdvancedSearch_delete_works (114.55 KB, image/png)
2016-04-25 17:08 UTC, amogh
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1348 0 normal SHIPPED_LIVE CFME 5.6.0 bug fixes and enhancement update 2016-06-29 18:50:04 UTC

Description Harpreet Kataria 2016-01-14 15:57:32 UTC
Created attachment 1114876 [details]
Delete button still enabled

Description of problem: Delete button remains enabled after deleting the filter


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


How reproducible:


Steps to Reproduce:
1. Go VM explorer, advanced search
2. Add a filter, then load the filter that was added.
3. Press Delete button to delete the filter, after filter is deleted, "Delete" button is still enabled and if i press it again i see an error on the background screen.

Actual results: Delete button remains enabled after filter is deleted, clicking on it again throws an error

[----] I, [2016-01-14T10:55:24.586152 #8813:baf98c]  INFO -- : Completed 200 OK in 59ms (Views: 8.6ms | ActiveRecord: 15.8ms)
[----] I, [2016-01-14T10:55:37.132679 #8813:baf98c]  INFO -- : Started POST "/vm_infra/adv_search_button?button=delete" for 127.0.0.1 at 2016-01-14 10:55:37 -0500
[----] I, [2016-01-14T10:55:37.160629 #8813:baf98c]  INFO -- : Processing by VmInfraController#adv_search_button as JS
[----] I, [2016-01-14T10:55:37.160719 #8813:baf98c]  INFO -- :   Parameters: {"button"=>"delete"}
[----] F, [2016-01-14T10:55:37.182169 #8813:baf98c] FATAL -- : Error caught: [ActiveRecord::RecordNotFound] Couldn't find MiqSearch with 'id'=1000000000140
/home/hkataria/.rvm/gems/ruby-2.2.2/gems/activerecord-4.2.5/lib/active_record/core.rb:155:in `find'
/home/hkataria/dev/manageiq/app/controllers/application_controller/filter.rb:686:in `adv_search_button'


Expected results: Delete button should become disabled/grayed until another filter is loaded


Additional info:

Comment 2 Harpreet Kataria 2016-03-03 15:19:59 UTC
https://github.com/ManageIQ/manageiq/pull/7083

Comment 3 CFME Bot 2016-03-15 22:01:10 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/06c215b9c0be6d40d2a0ad82f245bae5b7c6c4eb

commit 06c215b9c0be6d40d2a0ad82f245bae5b7c6c4eb
Author:     Harpreet Kataria <hkataria>
AuthorDate: Thu Mar 3 09:53:14 2016 -0500
Commit:     Harpreet Kataria <hkataria>
CommitDate: Thu Mar 3 10:23:59 2016 -0500

    Clear selected filter after it is deleted or reset button is pressed.
    
    Not clearing the filter after filter is deleted is causing to show "Delete" as enabled after filter is deleted and pressing it again throws an error.
    This also removes empty parenthesis in the title on Advanced search modal when Delete/Reset is pressed.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1298645
    https://bugzilla.redhat.com/show_bug.cgi?id=1314434

 app/controllers/application_controller/filter.rb | 1 +
 1 file changed, 1 insertion(+)

Comment 4 CFME Bot 2016-03-16 16:47:04 UTC
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=e20afea6815416161690843ba7b4b53d6fea3cff

commit e20afea6815416161690843ba7b4b53d6fea3cff
Author:     Harpreet Kataria <hkataria>
AuthorDate: Thu Mar 3 09:53:14 2016 -0500
Commit:     Harpreet Kataria <hkataria>
CommitDate: Wed Mar 16 09:15:51 2016 -0400

    Clear selected filter after it is deleted or reset button is pressed.
    
    Not clearing the filter after filter is deleted is causing to show "Delete" as enabled after filter is deleted and pressing it again throws an error.
    This also removes empty parenthesis in the title on Advanced search modal when Delete/Reset is pressed.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1298645
    https://bugzilla.redhat.com/show_bug.cgi?id=1314434
    (cherry picked from commit 06c215b)

 app/controllers/application_controller/filter.rb | 1 +
 1 file changed, 1 insertion(+)

Comment 5 CFME Bot 2016-03-16 16:47:12 UTC
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=cc8887037b1d3ac2a15acfe9d6217ff7c1fdb555

commit cc8887037b1d3ac2a15acfe9d6217ff7c1fdb555
Merge: 4e7fc09 e20afea
Author:     Dan Clarizio <dclarizi>
AuthorDate: Wed Mar 16 12:23:46 2016 -0400
Commit:     Dan Clarizio <dclarizi>
CommitDate: Wed Mar 16 12:23:46 2016 -0400

    Merge branch '55z_pr_7083' into '5.5.z'
    
    Clear selected filter after it is deleted or reset button is pressed.
    
    Not clearing the filter after filter is deleted is causing to show "Delete" as enabled after filter is deleted and pressing it again throws an error.
    This also removes empty parenthesis in the title on Advanced search modal when Delete/Reset is pressed.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1298645
    https://bugzilla.redhat.com/show_bug.cgi?id=1314434
    (cherry picked from commit 06c215b)
    
    @dclarizi please review, clean cherry-pick from https://github.com/ManageIQ/manageiq/pull/7083
    
    See merge request !855

 app/controllers/application_controller/filter.rb | 1 +
 1 file changed, 1 insertion(+)

Comment 7 Harpreet Kataria 2016-03-21 14:42:02 UTC
*** Bug 1302450 has been marked as a duplicate of this bug. ***

Comment 8 Harpreet Kataria 2016-03-22 18:02:02 UTC
*** Bug 1283554 has been marked as a duplicate of this bug. ***

Comment 9 amogh 2016-04-25 17:08:20 UTC
Created attachment 1150559 [details]
AdvancedSearch_delete_works

Comment 10 amogh 2016-04-25 17:09:28 UTC
verified this bug in 5.6.0.4-beta2.3.20160421172650_719e256 and it is not reproducible. refer the screenshot "AdvancedSearch_delete_works"

Comment 12 errata-xmlrpc 2016-06-29 15:29:54 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-2016:1348


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