Login  Register

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

Posted by Scott Gray-2 on Apr 07, 2010; 11:33pm
URL: http://ofbiz.116.s1.nabble.com/Re-svn-commit-r931594-ofbiz-trunk-applications-product-src-org-ofbiz-shipment-shipment-ShipmentServia-tp1755801.html

On 7/04/2010, at 9:47 AM, [hidden email] 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

smime.p7s (3K) Download Attachment