Fix for bug in Inventory Reservation service

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

Fix for bug in Inventory Reservation service

Jacopo Cappellato-3
Hi all,

please find the attached fix for a bug I introduced while I was re-
factoring (to increase performance) the inventory reservation service.
Unfortunately I cannot commit it because the write access to svn has  
been disabled by the Apache Infrastructure because they are having  
some hardware problems.
Sorry for the headache, of course I will commit it as soon as the svn  
server is restored.

Jacopo



Reply | Threaded
Open this post in threaded view
|

Re: Fix for bug in Inventory Reservation service

Jacopo Cappellato-3
I'm copying the content of the patch here, just in case the attachment  
in my previous message didn't pass thru.

Jacopo



Index: applications/product/script/org/ofbiz/product/inventory/
InventoryReserveServices.xml
===================================================================
--- applications/product/script/org/ofbiz/product/inventory/
InventoryReserveServices.xml (revision 652071)
+++ applications/product/script/org/ofbiz/product/inventory/
InventoryReserveServices.xml (working copy)
@@ -84,8 +84,8 @@
                  <entity-condition entity-
name="InventoryItemAndLocation" list-name="inventoryItemAndLocations">
                      <condition-list combine="and">
                          <condition-expr field-name="productId" env-
name="parameters.productId"/>
-                        <condition-expr field-name="facilityId" env-
name="parameters.facilityId" ignore-if-null="true"/>
-                        <condition-expr field-name="containerId" env-
name="parameters.containerId" ignore-if-null="true"/>
+                        <condition-expr field-name="facilityId" env-
name="parameters.facilityId" ignore-if-empty="true" ignore-if-
null="true"/>
+                        <condition-expr field-name="containerId" env-
name="parameters.containerId" ignore-if-empty="true" ignore-if-
null="true"/>
                          <condition-expr field-
name="quantityOnHandTotal" operator="greater" value="0.0"/>
                          <condition-expr field-
name="locationTypeEnumId" operator="equals" value="FLT_PICKLOC"/>
                      </condition-list>
@@ -104,8 +104,8 @@
                      <entity-condition entity-
name="InventoryItemAndLocation" list-name="inventoryItemAndLocations">
                          <condition-list combine="and">
                              <condition-expr field-name="productId"  
env-name="parameters.productId"/>
-                            <condition-expr field-name="facilityId"  
env-name="parameters.facilityId" ignore-if-null="true"/>
-                            <condition-expr field-name="containerId"  
env-name="parameters.containerId" ignore-if-null="true"/>
+                            <condition-expr field-name="facilityId"  
env-name="parameters.facilityId" ignore-if-empty="true" ignore-if-
null="true"/>
+                            <condition-expr field-name="containerId"  
env-name="parameters.containerId" ignore-if-empty="true" ignore-if-
null="true"/>
                              <condition-expr field-
name="quantityOnHandTotal" operator="greater" value="0.0"/>
                              <condition-expr field-
name="locationTypeEnumId" operator="equals" value="FLT_BULK"/>
                          </condition-list>
@@ -125,8 +125,8 @@
                      <entity-condition entity-name="InventoryItem"  
list-name="inventoryItems">
                          <condition-list combine="and">
                              <condition-expr field-name="productId"  
env-name="parameters.productId"/>
-                            <condition-expr field-name="facilityId"  
env-name="parameters.facilityId" ignore-if-null="true"/>
-                            <condition-expr field-name="containerId"  
env-name="parameters.containerId" ignore-if-null="true"/>
+                            <condition-expr field-name="facilityId"  
env-name="parameters.facilityId" ignore-if-empty="true" ignore-if-
null="true"/>
+                            <condition-expr field-name="containerId"  
env-name="parameters.containerId" ignore-if-empty="true" ignore-if-
null="true"/>
                              <condition-expr field-
name="quantityOnHandTotal" operator="greater" value="0.0"/>
                              <condition-expr field-
name="locationSeqId" operator="equals" env-name="nullField"/>
                          </condition-list>


On Apr 29, 2008, at 6:45 AM, Jacopo Cappellato wrote:

> Hi all,
>
> please find the attached fix for a bug I introduced while I was re-
> factoring (to increase performance) the inventory reservation service.
> Unfortunately I cannot commit it because the write access to svn has  
> been disabled by the Apache Infrastructure because they are having  
> some hardware problems.
> Sorry for the headache, of course I will commit it as soon as the  
> svn server is restored.
>
> Jacopo
>
> <reservation.patch>