svn commit: r662406 - /ofbiz/trunk/applications/product/script/org/ofbiz/product/product/ProductServices.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r662406 - /ofbiz/trunk/applications/product/script/org/ofbiz/product/product/ProductServices.xml

jacopoc
Author: jacopoc
Date: Mon Jun  2 05:01:51 2008
New Revision: 662406

URL: http://svn.apache.org/viewvc?rev=662406&view=rev
Log:
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">