Bug 670874 - Personal Pools Being Created With Product ID Instead of Name
Summary: Personal Pools Being Created With Product ID Instead of Name
Alias: None
Product: Candlepin
Classification: Community
Component: candlepin
Version: 0.5
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: ---
Assignee: Bryan Kearney
QA Contact: John Sefler
Depends On:
Blocks: Entitlement-Beta
TreeView+ depends on / blocked
Reported: 2011-01-19 15:24 UTC by Devan Goodwin
Modified: 2015-05-14 15:23 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2011-02-23 21:51:41 UTC

Attachments (Terms of Use)

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:


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

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