Bug 797386 - RESTful API creates wrongly named sub-categories
Summary: RESTful API creates wrongly named sub-categories
Keywords:
Status: VERIFIED
Alias: None
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: BRM (Guvnor)
Version: BRMS 5.3.0.GA
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: BRMS 5.3.0.GA
Assignee: Mark Proctor
QA Contact: Lukáš Petrovický
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-25 13:48 UTC by Lukáš Petrovický
Modified: 2020-04-27 01:13 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: ---


Attachments (Terms of Use)

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


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