This is an automated email from the ASF dual-hosted git repository.
jacopoc pushed a commit to branch release24.09
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/release24.09 by this push:
new 47482e5355 Fixed: backward compatibility for internal requirements
without a quantity set (OFBIZ-13270) (#899)
47482e5355 is described below
commit 47482e535515a56cffb56d0b529e896458832909
Author: Jacopo Cappellato <[email protected]>
AuthorDate: Thu Jun 26 19:33:21 2025 +0200
Fixed: backward compatibility for internal requirements without a quantity
set (OFBIZ-13270) (#899)
After the changes introduced for OFBIZ-13270 ("Incorrect service call
for internal requirement may trigger unnecessary production runs") the
system returned an error when an internal requirement without its
"quantity" field set was approved. This was a different behavior as
before the system was using the default quantity of 1. This commit
restore the original behavior.
Thanks to Jacques Le Roux for the report.
---
.../apache/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java | 3 +++
1 file changed, 3 insertions(+)
diff --git
a/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
b/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
index 805164ed27..6da3dc1816 100644
---
a/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
+++
b/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
@@ -2528,6 +2528,9 @@ public class ProductionRunServices {
if (quantity == null) {
quantity = requirement.getBigDecimal("quantity");
}
+ if (quantity == null) {
+ quantity = BigDecimal.ONE;
+ }
Map<String, Object> serviceContext = new HashMap<>();
serviceContext.clear();
serviceContext.put("productId", requirement.getString("productId"));