Bug 786598

Summary: System Templates - issues exist when same repo name used across multiple products
Product: Red Hat Satellite Reporter: Brad Buckingham <bbuckingham>
Component: WebUIAssignee: Brad Buckingham <bbuckingham>
Status: CLOSED CURRENTRELEASE QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.0.1Keywords: Triaged
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-22 18:24:32 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:

Description Brad Buckingham 2012-02-01 21:10:12 UTC
Description of problem:

Observing issues creating/managing System Templates in Katello when the same 
name is used for repositories across multiple products.

The implementation for the UI is using repo name; however, it needs to be updated to use ID (which is unique).

Version-Release number of selected component (if applicable):
git master

How reproducible:
always

Steps to Reproduce:
1. create provider
2. create product 1 (e.g. custom1), repo A (e.g. repo1)
3. create product 2 (e.g. custom2), repo A (e.g. repo1)
4. create a system template, add 1 instance of repo1 to it (from either product) and save it
5. download/export the TDL
 
Actual results:

the exported TDL contains both repos... for example:

<repositories>
<repository name="repo1">
<url>
https://localhost/pulp/repos/ACME_Corporation/Library/custom/custom1/repo1
</url>
<persisted>No</persisted>
</repository>
<repository name="repo1">
<url>
https://localhost/pulp/repos/ACME_Corporation/Library/custom/custom2/repo1
</url>
<persisted>No</persisted>
</repository>
</repositories>

Expected results:

Since the user selected only 1 repo, there should only be 1 associated with and this should be reflected in the exported TDL as well.

Additional info:

Comment 1 Brad Buckingham 2012-02-06 16:57:33 UTC
commit - 9d098492575049fcf5688fd9faf5ee48eb9d8383

For system templates, a user may add a specific repo to a template by:
1. from the content tree on the left, select (+Add) for the desired repo
2. from the template tree on the right, navigate to 'Repositories', enter characters in to the auto-complete search box... once presented with a list of repositories that match (which also indicates which products they are part of), select the desired repo from the list and click +Add

Note: for option 2, if the user types the repo name and clicks add (without selecting from the dropdown), Katello will add all repos that match that name to the template.  This is necessary as Katello cannot decipher which one the user actually wanted to select.

Comment 2 Jeff Weiss 2012-02-09 23:46:46 UTC
Verified, katello-0.1.229-1.git.0.f2ad9e2.el6.noarch

Comment 4 Mike McCune 2013-08-16 18:09:21 UTC
getting rid of 6.0.0 version since that doesn't exist