ofbiz-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mbr...@apache.org
Subject svn commit: r1704013 - /ofbiz/branches/release13.07/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java
Date Sat, 19 Sep 2015 13:07:18 GMT
Author: mbrohl
Date: Sat Sep 19 13:07:18 2015
New Revision: 1704013

URL: http://svn.apache.org/viewvc?rev=1704013&view=rev
Log:
Manually applied patch for OFBIZ-6526: ordermgr/control/searchorders findOrders service returns
incorrect orderCount and therefore viewSize.

This patch replaces the HashSet with LinkedHashSet for fieldsToSelect because otherwise statusId
was being added to the front of the set which was then passed to count distinct query causing
incorrect counts. LinkedHashSet preserves the order in which items are added so orderId always
appears at the front of the set for the count distinct query.

Thanks Christian Carlow for spotting this and providing the patch.

Modified:
    ofbiz/branches/release13.07/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java

Modified: ofbiz/branches/release13.07/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java?rev=1704013&r1=1704012&r2=1704013&view=diff
==============================================================================
--- ofbiz/branches/release13.07/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java
(original)
+++ ofbiz/branches/release13.07/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java
Sat Sep 19 13:07:18 2015
@@ -20,9 +20,11 @@
 package org.ofbiz.order.order;
 
 import java.math.BigDecimal;
+import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
+import java.util.Set;
 
 import javolution.util.FastList;
 
@@ -75,7 +77,7 @@ public class OrderLookupServices {
         }
 
         // list of fields to select (initial list)
-        List<String> fieldsToSelect = FastList.newInstance();
+        Set<String> fieldsToSelect = new LinkedHashSet<String>();
         fieldsToSelect.add("orderId");
         fieldsToSelect.add("orderName");
         fieldsToSelect.add("statusId");



Mime
View raw message