Bug 1400556 - Selected packages stay selected when them adding to a custom channel, and user changes to different channel in the process
Summary: Selected packages stay selected when them adding to a custom channel, and use...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: WebUI
Version: 570
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Grant Gainey
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-01 13:35 UTC by Radovan Drazny
Modified: 2017-05-17 20:24 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-05-17 20:24:46 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Radovan Drazny 2016-12-01 13:35:19 UTC
Description of problem:
When adding packages to a custom channel using the WebUI, the package selection is persistent across the channel changes. See the reproducer for more details.

Version-Release number of selected component (if applicable):
spacewalk-java-2.3.8-155.el6sat

How reproducible:
always

Steps to Reproduce:
1. Have al least two Red Hat channels synced. Can be two base channels, or base and child channels, doesn't matter.
2. Create a new custom channel
3. Go to Manage Software Channels and open the new custom channel  
4. Open the Packages tab, go to Add Packages, select one of Red Hat channels and press View Packages button.
5. List of packages is displayed. Select one or more packages. Number of selected packages is displayed beside the total number of packages in the channel.
6. Switch to another Red Hat channel in the dropdown menu, and press the View Packages button again.
7. New list of packages is displayed, but there is still text indicating that there are packages selected.
8. If you press the Add package(s) button now, there will be a confirmation screen displaying packages to be added to the custom channel. It will contain packages selected in the step 5, even if last displayed channel was the one from steps 6-7. 
9. If you select some packages from the second Red Hat channel (from step 7), they will be added to the selection, and after pressing the Add package(s) button, confirmation screen will contain all selected packages from both Red Hat channels.



Actual results:
Package selection is persistent across channel changes.


Expected results:
Selection should be cleared when source channel changes.

Additional info:
This behaviour can be actually considered to be a feature, but it can be pretty confusing for a user as well. For example if the user selects big base channel with thousands of packages, selects them all, and then switches to a smaller channel. Package number indicator now displays "1 - 25 of 101 (18270 selected)", for example.

Comment 2 Grant Gainey 2017-02-15 20:17:03 UTC
SO, this actually *is* a feature, because it is not atypical for customers to build custom-channel-contents from packages found in multiple channels. The problem is that the 'selected from this list' rhnSet, is being overloaded to be the 'selected from all channels so far' rhnSet.

Will investigate to see if there's a reasonable way to separate the two concerns while retaining the add-to-selection behavior that we need/want here.

Comment 3 Grant Gainey 2017-05-01 18:22:08 UTC
How much work is it worth putting into this? Looks like it's going to require

* changing the checkbox-ajax to talk to a new RhnSet *in addition to* the channel-RhnSet, 
* ability to display information about the new select-to-copy-RhnSet, 
* ability to clear select-to-copy-RhnSet,
* on channel-switch:
  * empty the channel-RhnSet 
  * reset channel-RhnSet to select any packages in the new channel that are already 
    in the select-to-copy-RhnSet (because in addition to handling 'user 
    went back to previous channel', RPMs can also be in multiple channels at once 
    and may therefore already be selected).
* handle the interactions between all of this

We can make this happen, but it's non-trivial. I don't think I'd add this to 5.8.

Comment 4 Grant Gainey 2017-05-09 14:32:33 UTC
Leaving this open but removing from 5.8

Comment 5 Grant Gainey 2017-05-17 20:24:46 UTC
This is a pretty invasive change, for something no customer has asked for. I'm going to close as WONTFIX.


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