Bug 1731136 - HostCollection Errata Install WebUI errata selection and pagination issues
Summary: HostCollection Errata Install WebUI errata selection and pagination issues
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Host Collections
Version: 6.6.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: 6.7.0
Assignee: Justin Sherrill
QA Contact: Radovan Drazny
URL:
Whiteboard:
: 1437296 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-07-18 12:14 UTC by Radovan Drazny
Modified: 2020-07-07 12:10 UTC (History)
5 users (show)

Fixed In Version: tfm-rubygem-katello-3.14.0.9-1,tfm-rubygem-katello-3.14.0.20-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-14 13:25:08 UTC
Target Upstream Version:


Attachments (Terms of Use)
90 of 80 selected (102.68 KB, image/png)
2019-07-18 12:14 UTC, Radovan Drazny
no flags Details
true select all (100.33 KB, image/png)
2020-03-13 18:22 UTC, Walden Raines
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 27647 0 High Closed HostCollection Errata Install WebUI errata selection and pagination issues 2020-09-30 14:10:37 UTC
Foreman Issue Tracker 29374 0 Normal Closed bulk errata install prefers errata_ids even when install_all is passed 2020-09-30 14:10:37 UTC
Red Hat Product Errata RHSA-2020:1454 0 None None None 2020-04-14 13:25:20 UTC

Description Radovan Drazny 2019-07-18 12:14:32 UTC
Created attachment 1591755 [details]
90 of 80 selected

Description of problem:
Using Errata Installation for a Host Collection has multiple issues, all related to incorrect handling of errata selection .

Version-Release number of selected component (if applicable):
Sat 6.6 Snap 11

How reproducible:
always

Steps to Reproduce:
1. Create a Host Collection and assing multiple hosts with installable errata to it. I have used released RHEL 7.6 without any updates. 
2. Navigate to Hosts-> Host Collectins -> <host collection created in step 1>
3. Click Errata Installation

Now you can encounter multiple issues with a common root cause (I guess):
You start with pagination of 20 items per page by default. Select a few errata (3 in my case).

- if you change the page, you can see there are still 3 of 80 errata selected. If you change the page back to the initial one, there are still 3 of 80 selected, but you can't see the checkmarks at the errata you have previously selected anymore - all checkmarks are empty.

- same thing happens if you change the pagination number e.g. from 20 to 50. Checkmarks are gone, yet the dialog still states there are 3 of 80 selected. 

- only way how to clean the selection is to click on the "Refresh Table" button, close the dialog, or click the "select all" checkmark button in the column header. 

- if you use the column checkmark button to select all errata, only the errata on the current page is selected. Fair enough. The problem is, if you switch the page, naturally no errata is selected on the the new page, but the column header check button is still checked. Clicking it clears out the selection you have made on the previous page, and has no effect on the current page selection. It means the user is not able to select all the errata on a multipage dialog using the column button - only by manually clicking each erratum on subsequent pages.

- this works the other way as well - if you manually select some errata on one page, then switch the page, and use the check button in the column header to select all errata on the current page, previously manually selected errata is cleared, and only the errata on the current page is selected (at least according to "x of y selected" line, as it is not possible to check the selection because of the issues described above)

- if you successfully select all the errata on all pages in the dialog, change the page again, and then manually start selecting the (now clean) checkmarks, the status line starts to overflow, showing things like 90 of 80 selected. See the attached screenshot. 

- as for the functionality itself - changing the page really clears the selection, even if the status line claims there are some errata selected. The "Install Selected" button is still active and can be pressed. Doing so causes the an error message "No content has been provided". Only checkmarks that are actually present and visible are taken into account when submitting the installation job.

Actual results:
The checkmarks handling is inconsistent, and it is actually not possible to select errata from multiple pages.

Expected results:
Checkmarks are preserved despite the page and pagination size changes. The status line showing number of selected errata reflects the real state of selection. Errata on multiple pages can be selected.

Comment 3 Brad Buckingham 2019-07-22 21:00:20 UTC
Note: the issue with 'select all' sounds like a duplicate of bug 1631957.  Some of the workflow may have changed since 6.3; however, 'select all' was an issue then as well.

Radovan, do you agree?

Comment 4 Radovan Drazny 2019-07-23 10:15:52 UTC
The behavior described in the bug 1631957 is somewhat similar, yes. But the 'select all' checkbox behavior is only a secondary and misleading symptom in host collection errata selection page. If you use the "select all" checkbox, you will select all errata on the current page, checkboxes are checked, and the status line says e.g. "20 of 80 Selected". Clicking the next page button now is enough to actually clear the selection. Yes, the status line on the next page still says "20 of 80 Selected", but clicking the Install button now and confirming the installation produces an error message "No content has been provided." The selection you have made on the previous page is already lost at this point, it doesn't matter if the "select all" checkbox is checked, and if the user clicks on it now. Actually, clicking it kind of "fixes" the status - the "select all" checkbox is cleared, "X of Y Selected" status line is reset to the true state (0 of Y Selected), and the "Install" button is disabled. The critical action is the page change (or changing the items per page number), as the widget clearly doesn't properly save the current state of selection on the page change.

Comment 5 Brad Buckingham 2019-07-23 17:43:11 UTC
Hi Radovan,

I understand that the 'select all' behavior raised is only one of the issues/observations raised by the bugzilla.  That said, if it is a duplicate of the behavior described by bug 1631957, we can track the resolution there.  Sound reasonable?

Second, for the behavior of checkboxes, paging and '90 of 80' issues, are these behaviors regressions from Satellite 6.5?

Comment 6 Radovan Drazny 2019-07-24 10:50:07 UTC
(In reply to Brad Buckingham from comment #5)
> Hi Radovan,
> 
> I understand that the 'select all' behavior raised is only one of the
> issues/observations raised by the bugzilla.  That said, if it is a duplicate
> of the behavior described by bug 1631957, we can track the resolution there.
> Sound reasonable?
> 
> Second, for the behavior of checkboxes, paging and '90 of 80' issues, are
> these behaviors regressions from Satellite 6.5?

Yep, sounds reasonable.

As for the second question - no regression, I'm seeing the same behavior on the current Sat 6.5.2 snap.

Comment 7 Brad Buckingham 2019-08-06 14:55:47 UTC
Radovan,  Thanks!

Outcome:

Based on the discussion, we'll track resolving the behavior associated with 'select all' using bug 1631957.

That said, the other issues not related to 'select all', such as the behavior of checkboxes, paging, '90 of 80'...etc, should be addressed by this bugzilla.

Comment 8 Walden Raines 2019-08-16 21:58:31 UTC
Created redmine issue https://projects.theforeman.org/issues/27647 from this bug

Comment 9 Walden Raines 2020-01-17 00:34:58 UTC
PR: https://github.com/Katello/katello/pull/8531

Comment 10 Bryan Kearney 2020-01-22 19:02:33 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/27647 has been resolved.

Comment 11 Justin Sherrill 2020-02-03 02:43:06 UTC
*** Bug 1437296 has been marked as a duplicate of this bug. ***

Comment 14 Radovan Drazny 2020-03-13 11:47:16 UTC
Tested with Satellite 6.7 Snap 15 (tfm-rubygem-katello-3.14.0.15-1.el7sat.noarch). I still see same behaviour as described in the initial report:
- selecting some errata and switching widget page leaves status bar indicating that "x of y selected" but pressing Install button fails with a "no content provided" message
- using the select all checkmark selects only current page, again switching the page loses the selection in the same manner as in the previous point
- changing pages a few times and clicking on multiple checkboxes can get widget into state "x+10 of x selected"

Comment 15 Walden Raines 2020-03-13 18:21:57 UTC
(In reply to Brad Buckingham from comment #7)
> Radovan,  Thanks!
> 
> Outcome:
> 
> Based on the discussion, we'll track resolving the behavior associated with
> 'select all' using bug 1631957.
> 
> That said, the other issues not related to 'select all', such as the
> behavior of checkboxes, paging, '90 of 80'...etc, should be addressed by
> this bugzilla.

This bugzilla only addresses adding the ability to truly select all, it does not fix all the oddities with the select all and the totals which exist on all tables.


See attached screenshot.

Comment 16 Walden Raines 2020-03-13 18:22:32 UTC
Created attachment 1669968 [details]
true select all

Comment 17 Radovan Drazny 2020-03-17 19:22:15 UTC
(In reply to Walden Raines from comment #15)
> (In reply to Brad Buckingham from comment #7)
> > Radovan,  Thanks!
> > 
> > Outcome:
> > 
> > Based on the discussion, we'll track resolving the behavior associated with
> > 'select all' using bug 1631957.
> > 
> > That said, the other issues not related to 'select all', such as the
> > behavior of checkboxes, paging, '90 of 80'...etc, should be addressed by
> > this bugzilla.
> 
> This bugzilla only addresses adding the ability to truly select all, it does
> not fix all the oddities with the select all and the totals which exist on
> all tables.
> 
> 
> See attached screenshot.

Ah, sorry, I remembered it other way around, and didn't refresh my memory by reading the comment #7. Sorry about that. 

The "Select All" function works, even if it is two-step process now. User has to select all items on a page by clicking the checkmark box in the header, and then a option for the "real" Select All is offered. Nevertheless, there are issues - one cosmetic, one critical.

- the cosmetic one - when the total number of errata for the given Host Collection, and you click the "select all on the current page" checkbox, you will get following text (numbers will vary, of course): "(All 11 items on this page are selected. Select all 11.)" Only after clicking "Select all 11", the text changes to "11 results are selected. Deselect all" This looks strange, but it is only a cosmetic issue.

- the critical one - when you select all errata available (multipage). After clicking the "Install selected" button, the widget will ask if you really want to install all xxx errata. When you confirm, an installation task will be created. The problem is, it contains only the errata from the current page, not ALL the errata from multiple pages. If the pagination is set to 20, only 20 errata will be scheduled to install, if set to 100,  only 100 errata will get scheduled and installed.

Comment 18 Justin Sherrill 2020-03-18 19:00:13 UTC
Connecting redmine issue https://projects.theforeman.org/issues/29374 from this bug

Comment 20 Radovan Drazny 2020-03-26 09:28:16 UTC
Tested with Satellite 6.7 Snap 17 (tfm-rubygem-katello-3.14.0.20-1). All errata can be selected as described in comment #17. After selecting all errata and submitting to install, all errata on multiple pages is installed.

Comment 22 errata-xmlrpc 2020-04-14 13:25:08 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-2020:1454


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