Bug 717053

Summary: Products/Packages in change set always says "0" on promotions page
Product: Red Hat Satellite Reporter: Jeff Weiss <jweiss>
Component: WebUIAssignee: Justin Sherrill <jsherril>
Status: CLOSED CURRENTRELEASE QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.0.1CC: dajohnso, sghai
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
candlepin-0.4.4-1.fc14.noarch
Last Closed: 2012-08-22 17:47:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 747354    
Attachments:
Description Flags
Entries in changeset after adding a repo ( not proudct)
none
This screenshot shows the +Add for packages.
none
package count as per the added pkgs in changeset none

Description Jeff Weiss 2011-06-27 20:06:41 UTC
Description of problem:


Version-Release number of selected component (if applicable):
katello-0.1.49-1.git.10.6c5d907.fc14.noarch

How reproducible:
always

Steps to Reproduce:
1. Create a custom provider, a product inside that, and a repo inside that (that points to a small yum repo - mine had 4 rpms). 
  
2. Create an environment past Locker in the default org
3. Go to Promotions, select the product you created, add it to the change set. 
  
Actual results:
Packages: 0 Repositories: 0

Expected results:
Packages: 4 Repositories: 1


Additional info:
Syncing the product first makes no difference.

Comment 1 Justin Sherrill 2011-07-13 17:16:18 UTC
I believe we discussed this a while back probably after this bug was opened.  This text was meant to summarize the changeset contents (i.e. what the user added to the changeset).  

It was not meant to show the 'effective contents', that is what all packages are added as a result of the changeset contents.  The new page I think makes this somewhat more apparent, but please let me know if it doesn't.

Comment 2 Sachin Ghai 2011-08-26 09:15:12 UTC
I tried to verify this defect with following katello build:
[root@dhcp201-167 ~]# rpm -qa | grep katello
katello-cli-0.1.5-1.git.15.654a7df.fc15.noarch
katello-0.1.70-1.git.7.ca8d03c.fc15.noarch

Here are my observations:

1. I created a changeset and added a product in to changeset, however I couldn't able to see the count of product/repositories/packages in changeset. Is it expected ?

2. If I traverse into a product by double clicking on the product in left pane, 
I can see following entries:

- Errata
- Packages
- Repositories
- Distributions

However +Add is only available for 'Repositories', not for others. Is it expected behaviour ?

3. If click on +Add under 'Repositories' to add a repo ( not a product), I can see the following entries in changeset
 - Errata(0)
 - Repositories(1)
 - Undefined(0)

here why the last option is displayed as 'undefined(0)', looks like something missing here. 

Please see the attached screenshot (repo_add.png)

Comment 3 Sachin Ghai 2011-08-26 09:16:37 UTC
Created attachment 520043 [details]
Entries in changeset after adding a repo ( not proudct)

Comment 4 Justin Sherrill 2011-08-26 20:22:32 UTC
Hey Sachin,

1)  Yes.  The changeset view is showing what you have added.  In that case you added a complete product, so we don't show you the individual components.

2) I believe that was a bug that was fixed (we weren't making sure the product was in the next environment properly).  Although I'm not certain your exact steps, was the full product already in the changeset before you did that?

3) I wasn't able to reproduce this, but see my uncertainty about #2 above.

FYI:

Before you can promote a repo/package/errata, the product must have been promoted to the next environment at some point.  The easiest way to do this is:

1.  Add a product
2.  Add a Repo
3.  DO NOT SYNC THE REPO
4.  Promote the product
5.  Sync the repo
6.  You should now be able to add packages to teh changeset.

Other notes:

Once you add a full product to a changeset, you should not be able to add parts of it (package, errata, repo).  

The only way you should be able to add a package/repo/errata to a changeset is if:

a) There is a next environment
b) The product is already in the next environment
c) The package/repo/errata is not already in the next environment for that product
d) The entire product is not already added to the changeset
e) a changeset is selected

Comment 5 Justin Sherrill 2011-08-26 20:23:28 UTC
The issue i fixed above is fixed in f743c122455b44bc6d9053d628b76bd824bb1d73   katello-0.1.71-1

Comment 6 Sachin Ghai 2011-08-29 10:39:32 UTC
Thanks for a nice summary in comment4.

> 2) I believe that was a bug that was fixed (we weren't making sure the product
> was in the next environment properly).  Although I'm not certain your exact
> steps, was the full product already in the changeset before you did that?

No, full product was not already in changeset. I created a changeset and tried to add repositories with +Add. 
Now with latest build (katello-0.1.71-1), the +Add is not available for Repositories.


> 1.  Add a product
> 2.  Add a Repo
> 3.  DO NOT SYNC THE REPO
> 4.  Promote the product
> 5.  Sync the repo
> 6.  You should now be able to add packages to teh changeset.

Yes, now with above steps I can add packages to the changeset ( see pkg_add.png).

Comment 7 Sachin Ghai 2011-08-29 10:40:59 UTC
Created attachment 520339 [details]
This screenshot shows the +Add for packages.

Comment 8 Sachin Ghai 2011-08-29 10:49:20 UTC
Created attachment 520343 [details]
package count as per the added pkgs in changeset

Comment 11 Mike McCune 2013-08-16 17:54:35 UTC
getting rid of 6.0.0 version since that doesn't exist