This is an automated email from the ASF dual-hosted git repository.
mridulpathak pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/trunk by this push:
new 1138b75968 Fixed: Mini-lang to Groovy regressions in
InventoryIssueServices (OFBIZ-13577)
1138b75968 is described below
commit 1138b759680a58e625311adfffcd2291c55ee3b5
Author: Mridul Pathak <[email protected]>
AuthorDate: Sun Sep 13 22:55:05 2026 +0530
Fixed: Mini-lang to Groovy regressions in InventoryIssueServices
(OFBIZ-13577)
- issueImmediatelyFulfilledOrderItem: set parameters.quantityNotIssued from
orderItem.quantity before iterating the matching InventoryItem list
instead of after. The conversion moved this assignment past the loop, so
every invocation with a matching InventoryItem silently skipped the
existing-inventory issuance path (Groovy's null-safe > comparison, not a
crash) and fell through to creating a redundant new InventoryItem instead
of issuing from the one that already exists.
- issueImmediateForInventoryItemInline: fix the orderitemSeqId typo to
orderItemSeqId in the non-serialized-inventory createItemIssuance call,
which silently dropped the field (stripped by the service dispatcher's
context validation) and left ItemIssuance.orderItemSeqId null.
---
.../ofbiz/product/product/inventory/InventoryIssueServices.groovy | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/applications/product/src/main/groovy/org/apache/ofbiz/product/product/inventory/InventoryIssueServices.groovy
b/applications/product/src/main/groovy/org/apache/ofbiz/product/product/inventory/InventoryIssueServices.groovy
index c1970530ae..24a8b2aeda 100644
---
a/applications/product/src/main/groovy/org/apache/ofbiz/product/product/inventory/InventoryIssueServices.groovy
+++
b/applications/product/src/main/groovy/org/apache/ofbiz/product/product/inventory/InventoryIssueServices.groovy
@@ -98,6 +98,7 @@ Map issueImmediatelyFulfilledOrderItem() {
}
Map lookupFieldMap = [productId: orderItem.productId,
facilityId: orderHeader.originFacilityId]
+ parameters.quantityNotIssued = orderItem.quantity
from('InventoryItem')
.where(lookupFieldMap)
.orderBy(orderBy)
@@ -111,7 +112,6 @@ Map issueImmediatelyFulfilledOrderItem() {
}
}
- parameters.quantityNotIssued = orderItem.quantity
// if quantityNotIssued is not 0, then pull it from the last
non-serialized inventory item found,
// in the quantityNotIssued field
if (parameters.quantityNotIssued != (BigDecimal.ZERO)) {
@@ -201,7 +201,7 @@ GenericValue
issueImmediateForInventoryItemInline(GenericValue inventoryItem) {
// create ItemIssuance record
Map serviceResult = run service: 'createItemIssuance',
with: [orderId: parameters.orderId,
- orderitemSeqId: parameters.orderItemSeqId,
+ orderItemSeqId: parameters.orderItemSeqId,
inventoryItemId: inventoryItem.inventoryItemId,
quantity: parameters.deductAmount]
String itemIssuanceId = serviceResult.itemIssuanceId