Bug 799052

Summary: Promoting template with assigned repo should fail if product is not already in the target environment
Product: Red Hat Satellite Reporter: Ivan Necas <inecas>
Component: Content ManagementAssignee: Martin Bacovsky <mbacovsk>
Status: CLOSED ERRATA QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.0.0CC: bkearney, gkhachik, jrist, mbacovsk
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:
Last Closed: 2012-05-15 18:55:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Script for reproducing the error none

Description Ivan Necas 2012-03-01 16:39:00 UTC
Version-Release number of selected component (if applicable):
katello-0.1.300-1

How reproducible:
Always

Steps to Reproduce (see attached script):
1.create org, env, provider, product, repo
2.create template
3.add only repo to the template
4.promote template
  
Actual results:
Repo is being promoted (fails on another error - see https://bugzilla.redhat.com/show_bug.cgi?id=799036)

Expected results:
Refusing to promote template with repo of product, that is not already promoted.

Comment 1 Ivan Necas 2012-03-01 16:40:20 UTC
Created attachment 566884 [details]
Script for reproducing the error

Comment 2 Martin Bacovsky 2012-03-07 12:41:27 UTC
taking...

Comment 3 Martin Bacovsky 2012-03-13 16:01:48 UTC
Pushed to master:

$ git log|grep 799052 -B4|grep commit
commit bb1509fc450730f74f229adc4ab96b217f26885f
commit 777d5b1974b1ad1c4a79c05c849d7ee29c986f7f

The changes should land in katello-0.2.13

Unittest was added as well

Comment 6 Jeff Weiss 2012-03-16 01:15:57 UTC
Verified: 
×Failed to promote: Cannot promote the changset 'changeset-1331760780096' because the repo 'mytestrepo-1331760763090' does not belong to any promoted product.

katello-0.2.13-1.git.7.31eb4ce.el6

Comment 7 errata-xmlrpc 2012-05-15 18:55:56 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.

http://rhn.redhat.com/errata/RHEA-2012-0665.html