Bug 1207488

Summary: Content Hosts > Subscriptions: Switching between "List/Remove" and "Add" doesn't toggle right/leads to off-by-one
Product: Red Hat Satellite Reporter: Corey Welton <cwelton>
Component: WebUIAssignee: Christine Fouant <cfouant>
WebUI sub component: Katello QA Contact: Tazim Kolhar <tkolhar>
Status: CLOSED CURRENTRELEASE Docs Contact:
Severity: high    
Priority: unspecified CC: bkearney, cwelton, mmccune, tkolhar
Version: Unspecified   
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/10537
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-12 13:57:44 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:
Attachments:
Description Flags
screenshot
none
another screenshot none

Description Corey Welton 2015-03-31 02:58:59 UTC
Description of problem:
Within the content host UI, when user selects an item in "Add", switches between the two tabs and returns, the expected button is no longer enabled, and unchecking/checking leads to the UI reading "-1"/"0" instead of "0"/"1"



Version-Release number of selected component (if applicable):
Satellite-6.1.0-RHEL-7-20150324.0

How reproducible:


Steps to Reproduce:
1.  Add a bunch of different content to an AC; register a system using AC
2.  Hosts > Content Host > $hostname > Subscriptions
3.  Noting "List/Remove" is the default tab, choose the "Add" tab.
4.  Click an available item in "Add", but DO NOT click 'Add Selected'.  Instead, nav back to the "List/Remove" tab.
5.  Noting the "Remove Selected" button is (correctly) grayed out, immediately switch back to the "Add" Tab.
6.  Note the state of the "Add Selected" button; select/deselect any item on list

Actual results:
* Button is incorrectly grayed out upon return to tab
* "x Selected" next to the "Add Selected button is incorrect.
* toggling selector can mean the "x Selected" reads -1 instead of 0 and 0 instead of 1, respectively.

Expected results:

Keep track of tabs and items selected, appropriately

Additional info:

I haven't looked to see if this actually affects usability yet - maybe not. But it is not very pretty.

Comment 1 Corey Welton 2015-03-31 03:00:18 UTC
Created attachment 1008759 [details]
screenshot

Comment 2 Corey Welton 2015-03-31 03:03:18 UTC
Created attachment 1008760 [details]
another screenshot

Screenshot with something selected.  Note that now, because of the off-by-one, even though something is selected, UI thinks there are zero and thus the button is grayed out.

Comment 4 Corey Welton 2015-03-31 03:27:04 UTC
Actually, this occurs in other places, too -- in the Activation Keys UI, for example, where user adds/removes repos from the key.

Comment 6 Christine Fouant 2015-05-18 17:17:20 UTC
Created redmine issue http://projects.theforeman.org/issues/10537 from this bug

Comment 7 Bryan Kearney 2015-05-28 16:05:22 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/10537 has been closed
-------------
Christine Fouant
Applied in changeset commit:katello|254542f5bb82cf5fcf840b3d1a00664dd44541c0.

Comment 9 Tazim Kolhar 2015-06-09 08:56:31 UTC
VERIFIED:

# rpm -qa | grep foreman
ruby193-rubygem-foreman-tasks-0.6.12.7-1.el7sat.noarch
rubygem-hammer_cli_foreman_docker-0.0.3.6-1.el7sat.noarch
foreman-libvirt-1.7.2.26-1.el7sat.noarch
ruby193-rubygem-foreman_gutterball-0.0.1.9-1.el7sat.noarch
ruby193-rubygem-foreman_bootdisk-4.0.2.13-1.el7sat.noarch
ibm-x3755-02.ovirt.rhts.eng.bos.redhat.com-foreman-proxy-1.0-1.noarch
foreman-gce-1.7.2.26-1.el7sat.noarch
rubygem-hammer_cli_foreman_discovery-0.0.1.10-1.el7sat.noarch
foreman-selinux-1.7.2.13-1.el7sat.noarch
foreman-compute-1.7.2.26-1.el7sat.noarch
foreman-ovirt-1.7.2.26-1.el7sat.noarch
rubygem-hammer_cli_foreman-0.1.4.14-1.el7sat.noarch
foreman-postgresql-1.7.2.26-1.el7sat.noarch
ruby193-rubygem-foreman_docker-1.2.0.14-1.el7sat.noarch
ruby193-rubygem-foreman_discovery-2.0.0.15-1.el7sat.noarch
ruby193-rubygem-foreman-redhat_access-0.2.0-6.el7sat.noarch
rubygem-hammer_cli_foreman_tasks-0.0.3.4-1.el7sat.noarch
foreman-proxy-1.7.2.5-1.el7sat.noarch
ibm-x3755-02.ovirt.rhts.eng.bos.redhat.com-foreman-client-1.0-1.noarch
ibm-x3755-02.ovirt.rhts.eng.bos.redhat.com-foreman-proxy-client-1.0-1.noarch
foreman-vmware-1.7.2.26-1.el7sat.noarch
rubygem-hammer_cli_foreman_bootdisk-0.1.2.7-1.el7sat.noarch
foreman-1.7.2.26-1.el7sat.noarch
ruby193-rubygem-foreman_hooks-0.3.7-2.el7sat.noarch
foreman-debug-1.7.2.26-1.el7sat.noarch

steps:
1.  Add a bunch of different content to an AC; register a system using AC
2.  Hosts > Content Host > $hostname > Subscriptions
3.  Noting "List/Remove" is the default tab, choose the "Add" tab.
4.  Click an available item in "Add", but DO NOT click 'Add Selected'.  Instead, nav back to the "List/Remove" tab.
5.  Noting the "Remove Selected" button is (correctly) grayed out, immediately switch back to the "Add" Tab.
6.  Note the state of the "Add Selected" button; select/deselect any item on list

Comment 10 Bryan Kearney 2015-08-11 13:32:04 UTC
This bug is slated to be released with Satellite 6.1.

Comment 11 Bryan Kearney 2015-08-12 13:57:44 UTC
This bug was fixed in version 6.1.1 of Satellite which was released on 12 August, 2015.