You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Scott Gray <sc...@hotwaxmedia.com> on 2010/04/08 01:33:36 UTC

Re: svn commit: r931594 - /ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java

On 7/04/2010, at 9:47 AM, doogie@apache.org wrote:

> Author: doogie
> Date: Wed Apr  7 15:47:27 2010
> New Revision: 931594
> 
> URL: http://svn.apache.org/viewvc?rev=931594&view=rev
> Log:
> If an exact productStoreShipMethId is requested, then do an exact AND
> match, not an OR.  Otherwise, both the original exact entity will be
> returned, *and* any others that happen to have the same
> carrierPartyId/shipmentMethodTypeId pair.  Then, when getFirst is
> called, it will effectively be random.  This bug shows up with showing
> cost estimates for a shipping method picker during checkout.
> 
> Modified:
>    ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java
> 
> Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java?rev=931594&r1=931593&r2=931594&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java (original)
> +++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java Wed Apr  7 15:47:27 2010
> @@ -250,7 +250,7 @@ public class ShipmentServices {
>         if (UtilValidate.isNotEmpty(productStoreShipMethId)) {
>             // if the productStoreShipMethId field is passed, then also get estimates that have the field set
>             List<EntityCondition> condList = UtilMisc.toList(EntityCondition.makeCondition("productStoreShipMethId", EntityOperator.EQUALS, productStoreShipMethId), estFieldsCond);
> -            estFieldsCond = EntityCondition.makeCondition(condList, EntityOperator.OR);
> +            estFieldsCond = EntityCondition.makeCondition(condList, EntityOperator.AND);

Doesn't matter but AND is the default so you don't need to specify it.  This is really just so you know I'm watching, squeaky wheel gets the oil after all :-)

Regards
Scott