[ofbiz-framework] branch release17.12 updated: Fixed: productServiceOrder-test issue, it has been introduced after we fixed InventoryItemStatus is not updated to INV_PROMISED status(OFBIZ-8459)

2020-05-28 Thread pawan
This is an automated email from the ASF dual-hosted git repository.

pawan pushed a commit to branch release17.12
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/release17.12 by this push:
 new 673fddf  Fixed: productServiceOrder-test issue, it has been introduced 
after we fixed InventoryItemStatus is not updated to INV_PROMISED 
status(OFBIZ-8459)
673fddf is described below

commit 673fddf72b90131020adee955393b0c0882cbd1d
Author: Pawan Verma 
AuthorDate: Thu May 28 19:58:27 2020 +0530

Fixed: productServiceOrder-test issue, it has been introduced after we 
fixed InventoryItemStatus is not updated to INV_PROMISED status(OFBIZ-8459)

Thanks, Jacques for the report.
---
 .../src/main/java/org/apache/ofbiz/order/order/OrderServices.java   | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderServices.java
 
b/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderServices.java
index f40348a..4590127 100644
--- 
a/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderServices.java
+++ 
b/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderServices.java
@@ -1033,6 +1033,7 @@ public class OrderServices {
 delegator.storeAll(toBeStored);
 
 List resErrorMessages = new LinkedList<>();
+GenericValue permUserLogin = 
EntityQuery.use(delegator).from("UserLogin").where("userLoginId", 
"system").cache().queryOne();
 
 // add a product service to inventory
 if (UtilValidate.isNotEmpty(orderItems)) {
@@ -1066,14 +1067,13 @@ public class OrderServices {
 
 Map ripCtx = new HashMap<>();
 if (UtilValidate.isNotEmpty(inventoryFacilityId) && 
UtilValidate.isNotEmpty(productId) && 
orderItem.getBigDecimal("quantity").compareTo(BigDecimal.ZERO) > 0) {
-// do something tricky here: run as the "system" 
user
-GenericValue permUserLogin = 
EntityQuery.use(delegator).from("UserLogin").where("userLoginId", 
"system").cache().queryOne();
 ripCtx.put("productId", productId);
 ripCtx.put("facilityId", inventoryFacilityId);
 ripCtx.put("inventoryItemTypeId", 
"SERIALIZED_INV_ITEM");
 ripCtx.put("statusId","INV_AVAILABLE");
 ripCtx.put("quantityAccepted", 
orderItem.getBigDecimal("quantity"));
 ripCtx.put("quantityRejected", 0.0);
+// do something tricky here: run as the "system" 
user
 ripCtx.put("userLogin", permUserLogin);
 try {
 Map ripResult = 
dispatcher.runSync("receiveInventoryProduct", ripCtx);
@@ -1093,7 +1093,7 @@ public class OrderServices {
 
 // START inventory reservation
 try {
-reserveInventory(delegator, dispatcher, userLogin, locale, 
orderItemShipGroupInfo, dropShipGroupIds, itemValuesBySeqId,
+reserveInventory(delegator, dispatcher, permUserLogin, locale, 
orderItemShipGroupInfo, dropShipGroupIds, itemValuesBySeqId,
 orderTypeId, productStoreId, resErrorMessages);
 } catch (GeneralException e) {
 return ServiceUtil.returnError(e.getMessage());



[ofbiz-framework] branch release17.12 updated: Fixed: productServiceOrder-test issue, it has been introduced after we fixed InventoryItemStatus is not updated to INV_PROMISED status(OFBIZ-8459)

2020-05-28 Thread pawan
This is an automated email from the ASF dual-hosted git repository.

pawan pushed a commit to branch release17.12
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/release17.12 by this push:
 new 78e1ee1  Fixed: productServiceOrder-test issue, it has been introduced 
after we fixed InventoryItemStatus is not updated to INV_PROMISED 
status(OFBIZ-8459)
78e1ee1 is described below

commit 78e1ee179592becc1514d346539c426c9e2c12d6
Author: Pawan Verma 
AuthorDate: Thu May 28 19:44:28 2020 +0530

Fixed: productServiceOrder-test issue, it has been introduced after we 
fixed InventoryItemStatus is not updated to INV_PROMISED status(OFBIZ-8459)

Thanks, Jacques for the report.
---
 plugins | 1 +
 1 file changed, 1 insertion(+)

diff --git a/plugins b/plugins
new file mode 16
index 000..2c65f7d
--- /dev/null
+++ b/plugins
@@ -0,0 +1 @@
+Subproject commit 2c65f7d17bcdbccd7d166701365c56bca40d2f2d