Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1717108

Summary: Filter & select option of Web UI fails logic and cached info of previous search is used in next filter results.
Product: Red Hat Satellite Reporter: Hradayesh Shukla <hshukla>
Component: WebUIAssignee: satellite6-bugs <satellite6-bugs>
WebUI sub component: Foreman QA Contact: vijsingh
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: high CC: asharvit, bkearney, briasmit, mhulan, satellite6-bugs, sghai, sgraessl, vijsingh, walden
Version: 6.5.0Keywords: Triaged
Target Milestone: 6.6.0   
Target Release: Unused   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-10-22 19:52:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Hradayesh Shukla 2019-06-04 17:24:29 UTC
Description of problem:
Filter & select option of Web UI fails logic and cached info of previous search is used in next filter results.  

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

How reproducible:
100% 

Steps to Reproduce:
1. Part 1 of filtering host selection is related to https://bugzilla.redhat.com/show_bug.cgi?id=1651966 
2. To reproduce the cached result, go to Satellite Web UI -> Hosts -> All Hosts -> Using the "Filter", filter some hosts by some parameter. For example: environment = production. Select the 2 or 3 hosts using checkbox. 
3. Now clear the current filter & then use another filter to narrow down search to "os = RedHat 7.6" -> Select the hosts and then perform an operation like Change Location or Delete Hosts. 
4. The hosts which were result from previous filter are also included in the current filtered host list on which operation will be performed. 
5. So somewhere the cache of previous search is still present.  

Actual results:
* The hosts which were result from previous filter are also included in the current filtered host list on which operation will be performed. 

Expected results:
* Only the current filtered hosts should be in the filtered host list. 

Additional info:
* This is urgent for the customer as this can accidentally delete production systems (from previous search query cache) while deleting de-commissioned systems.

Comment 4 Brian Smith 2019-06-07 16:23:41 UTC
*** Bug 1717202 has been marked as a duplicate of this bug. ***

Comment 5 Brian Smith 2019-06-07 16:27:02 UTC
Below is the information I provided in bug 1717202, which was a duplicate of this bug.  Note that this appears to be a regression from 6.4 to 6.5.  

In Satellite 6.5, if I go to Hosts -> All Hosts, and select all hosts (in my example, 3 hosts), and then filter for a specific host name, it says "3 of 1 selected".  If I unselect the specific hostname, it says "2 of 1 selected", and if I perform an action, like schedule remote job, it uses the hosts I had selected before I filtered for the specific host name.

This was fixed in Satellite 6.4 under https://bugzilla.redhat.com/show_bug.cgi?id=1589083 and I confirmed that Satellite 6.4.3 works as expected (previous selection is cleared when you filter).  

Version-Release number of selected component (if applicable):
satellite-6.5.0-11.el7sat.noarch

How reproducible:
Every time

Steps to Reproduce:
1. Go to Hosts -> All Hosts
2. Make a selection of hosts (or select all)
3. Filter for a specific hostname

Actual results:
The previously selected hosts are still selected even though they are not visible, and it says something like "2 of 1 selected".

Expected results:
The same behavior as Satellite 6.4 (when I filter for a host, the previously selected hosts are unselected)

Comment 13 vijsingh 2019-09-09 08:07:49 UTC
ON_QA Verified

@Satellite 6.6.0 snap 19.0

Steps:

 Test1) 
  1. Go to Hosts -> All Hosts
  2. Made a selection of hosts (or select all)
  3. Filtered for a specific hostname

 Test2)
  1. To Satellite Web UI -> Hosts -> All Hosts -> Using the "Filter", filtered  by environment = production. Selected the 2 or 3 hosts using checkbox. 
  2. Now cleared the current filter & then used another filter to narrow down search to os = RedHat -> Selected the hosts and then perform an operation like Change Location.


Observation:
 Test1 => Only the current filtered hosts showed in the filtered host list and selected too(The previously selected hosts do not show under selected)
 Test2 => The hosts which were result from previous filter were not included in the current filtered host list on which operation would be performed.

Comment 14 Bryan Kearney 2019-10-22 19:52:07 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/RHSA-2019:3172