Author: jacopoc
Date: Mon Jun 2 05:01:51 2008
New Revision: 662406
URL:
http://svn.apache.org/viewvc?rev=662406&view=revLog:
Fixed bug that was causing products with pending approval reviews (but no already approved reviews) to get 0 customer rating (for example in the advanced search sorted by average rating).
Modified:
ofbiz/trunk/applications/product/script/org/ofbiz/product/product/ProductServices.xml
Modified: ofbiz/trunk/applications/product/script/org/ofbiz/product/product/ProductServices.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/product/product/ProductServices.xml?rev=662406&r1=662405&r2=662406&view=diff==============================================================================
--- ofbiz/trunk/applications/product/script/org/ofbiz/product/product/ProductServices.xml (original)
+++ ofbiz/trunk/applications/product/script/org/ofbiz/product/product/ProductServices.xml Mon Jun 2 05:01:51 2008
@@ -585,8 +585,10 @@
<field field-name="delegator" type="org.ofbiz.entity.GenericDelegator"/>
<field field-name="productId" type="java.lang.String"/>
</call-class-method>
- <log level="info" message="Got new average customer rating ${product.averageCustomerRating}"/>
-
+ <log level="info" message="Got new average customer rating ${averageCustomerRating}"/>
+ <if-compare field-name="averageCustomerRating" operator="equals" value="0" type="Double">
+ <return/>
+ </if-compare>
<!-- update the review average on the ProductCalculatedInfo entity -->
<entity-one entity-name="ProductCalculatedInfo" value-name="productCalculatedInfo"/>
<if-empty field-name="productCalculatedInfo">