Bug 1298645 - UI: Advanced Search - Delete button remains enabled after deleting the filter
UI: Advanced Search - Delete button remains enabled after deleting the filter
Status: CLOSED ERRATA
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS (Show other bugs)
5.6.0
Unspecified Unspecified
medium Severity unspecified
: GA
: 5.6.0
Assigned To: Harpreet Kataria
Matouš Mojžíš
ui:search:filter
: ZStream
: 1283554 1302450 (view as bug list)
Depends On:
Blocks: 1314434 1320244
  Show dependency treegraph
 
Reported: 2016-01-14 10:57 EST by Harpreet Kataria
Modified: 2017-08-29 14:58 EDT (History)
11 users (show)

See Also:
Fixed In Version: 5.6.0.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1314434 (view as bug list)
Environment:
Last Closed: 2016-06-29 11:29:54 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Harpreet Kataria 2016-01-14 10:57:32 EST
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 10:19:59 EST
https://github.com/ManageIQ/manageiq/pull/7083
Comment 3 CFME Bot 2016-03-15 18:01:10 EDT
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/06c215b9c0be6d40d2a0ad82f245bae5b7c6c4eb

commit 06c215b9c0be6d40d2a0ad82f245bae5b7c6c4eb
Author:     Harpreet Kataria <hkataria@redhat.com>
AuthorDate: Thu Mar 3 09:53:14 2016 -0500
Commit:     Harpreet Kataria <hkataria@redhat.com>
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 12:47:04 EDT
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@redhat.com>
AuthorDate: Thu Mar 3 09:53:14 2016 -0500
Commit:     Harpreet Kataria <hkataria@redhat.com>
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 12:47:12 EDT
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@redhat.com>
AuthorDate: Wed Mar 16 12:23:46 2016 -0400
Commit:     Dan Clarizio <dclarizi@redhat.com>
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 10:42:02 EDT
*** Bug 1302450 has been marked as a duplicate of this bug. ***
Comment 8 Harpreet Kataria 2016-03-22 14:02:02 EDT
*** Bug 1283554 has been marked as a duplicate of this bug. ***
Comment 9 amogh 2016-04-25 13:08 EDT
Created attachment 1150559 [details]
AdvancedSearch_delete_works
Comment 10 amogh 2016-04-25 13:09:28 EDT
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 11:29:54 EDT
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.