Bug 670874

Summary: Personal Pools Being Created With Product ID Instead of Name
Product: [Community] Candlepin Reporter: Devan Goodwin <dgoodwin>
Component: candlepinAssignee: Bryan Kearney <bkearney>
Status: CLOSED CURRENTRELEASE QA Contact: John Sefler <jsefler>
Severity: high Docs Contact:
Priority: low    
Version: 0.5Keywords: QA-Closed
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-02-23 21:51:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 639436    

Description Devan Goodwin 2011-01-19 15:24:46 UTC
Recent changes to store the product name directly with pools introduced a bug where personal pools start showing up with a product name set to the products ID.

Caused by this constructor:

    public Pool(Owner ownerIn, String productId, String productName, 
        Set<ProvidedProduct> providedProducts, 
        Long quantityIn, Date startDateIn, Date endDateIn, String contractNumber,
        String accountNumber) {

and this call in PostEntHelper.createUserRestrictedPool:

        Pool consumerSpecificPool = new Pool(c.getOwner(), productId, 
            providedProductCopies, q,
            ent.getPool().getStartDate(), ent.getPool().getEndDate(),
            ent.getPool().getContractNumber(), ent.getPool().getAccountNumber());


You can see no product name is specified despite the constructor signature. Java appears to be getting confused and happily treating the first element in the provided products list as the product name.



Steps to Reproduce:

1. Complete normal process for creating a user restricted (personal) pool.

Actual results:

New pool will show up with a product ID instead of a name.

Expected results:

Name.

Comment 1 Bryan Kearney 2011-01-20 16:50:06 UTC
Fixed in f665e28f34f4831db1aeac863720f00abbc39fc3

This will require a new build of candlepin in the IT environment, and will require that all sub pools be re-created. If you unregister the person and re-register that should work.

Comment 2 John Sefler 2011-01-24 17:38:26 UTC
Verified in duplicate defect: https://bugzilla.redhat.com/show_bug.cgi?id=670344#c2