Bug 797386

Summary: RESTful API creates wrongly named sub-categories
Product: [JBoss] JBoss Enterprise BRMS Platform 5 Reporter: Lukáš Petrovický <lpetrovi>
Component: BRM (Guvnor)Assignee: Mark Proctor <mproctor>
Status: VERIFIED --- QA Contact: Lukáš Petrovický <lpetrovi>
Severity: medium Docs Contact:
Priority: unspecified    
Version: BRMS 5.3.0.GACC: mproctor
Target Milestone: ---Keywords: TestBlocker
Target Release: BRMS 5.3.0.GA   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Lukáš Petrovický 2012-02-25 13:48:56 UTC
When RESTful API is used with 5.3.0 ER4 and you use it to create package "A/B" (package "B" is a child of "A"), what is actually created is "A/_B" (package "_B" is a child of "A").

The problem lies here:
https://github.com/droolsjbpm/guvnor/blob/5.3.x/guvnor-webapp/src/main/java/org/drools/guvnor/server/jaxrs/CategoryResource.java#L153

Instead of properly understanding the "/" as a separator of two category names, the code just puts the "/" at the beginning on the child category's name. And this name is later replaced with "_".

The fix is fairly trivial:
name = categoryPath.substring(lastDotIndex + 1);

Comment 3 Ryan Zhang 2012-04-23 07:40:21 UTC
Update status to ON_QA. Please verify them against ER6.

Comment 5 Lukáš Petrovický 2012-05-02 09:50:01 UTC
VERIFIED