Author: lektran
Date: Thu Oct 15 23:13:52 2009
New Revision: 825697
URL:
http://svn.apache.org/viewvc?rev=825697&view=revLog:
Merged from trunk r825695
Fix a bug in the duplicateProductCategory service, when looking for parent category rollups to duplicate the find context was empty causing all rollups of all categories to be retrieved
Modified:
ofbiz/branches/release4.0/applications/product/script/org/ofbiz/product/category/CategoryServices.xml
Modified: ofbiz/branches/release4.0/applications/product/script/org/ofbiz/product/category/CategoryServices.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/product/script/org/ofbiz/product/category/CategoryServices.xml?rev=825697&r1=825696&r2=825697&view=diff==============================================================================
--- ofbiz/branches/release4.0/applications/product/script/org/ofbiz/product/category/CategoryServices.xml (original)
+++ ofbiz/branches/release4.0/applications/product/script/org/ofbiz/product/category/CategoryServices.xml Thu Oct 15 23:13:52 2009
@@ -601,7 +601,9 @@
child roll up is where oldProductCategoryId = ProductCategoryRollup.parentProductCategoryId and hence
requires a new find-by map -->
<if-not-empty field-name="duplicateParentRollup" map-name="parameters">
- <find-by-and entity-name="ProductCategoryRollup" map-name="categoryFindContext" list-name="foundValues"/>
+ <entity-and entity-name="ProductCategoryRollup" list-name="foundValues">
+ <field-map field-name="productCategoryId" env-name="parameters.oldProductCategoryId"/>
+ </entity-and>
<iterate entry-name="foundValue" list-name="foundValues">
<clone-value value-name="foundValue" new-value-name="newTempValue"/>
<set field="newTempValue.productCategoryId" from-field="parameters.productCategoryId"/>