|
Hi All,
Ran into a question while implementing quick ship in my OFBiz application (12.04.02). I'm looking to utilize the "quickShipEntireOrder" service which is defined in org/ofbiz/shipment/shipment/ShipmentServices.xml. This service makes a call out to the "createShipmentForFacilityAndShipGroup" service. As I would like the shipment to go to the "Shipped" status, it appears that this is based off of an additional service param, (String) "setPackedOnly" which is passed into "quickShipEntireOrder".
Initially I passed in a value for "setPackedOnly" because, on Line 1554, the logic is written such that the status will only be set to "SHIPMENT_SHIPPED" if "setPackedOnly" is not empty or null. However, even when I tried passing a value for "setPackedOnly", the condition would not trigger. I noticed through debugging that setPackedOnly is always empty/null when called in this service chain (quickShipEntireOrder -> createShipmentForFacilityAndShipGroup).
Assuming that the intended behavior of quickShipEntireOrder is for the shipment status to go to SHIPPED, and only go to PACKED if the setPackedOnly value is set, I have a couple of questions:
1. Should the condition on line 1554 instead only evaluate true (and thus set the status to SHIPPED) when when setPackedOnly IS empty (if-empty instead of if-not-empty), as it is on Lines 1720/1859?
2. Is it best for "setPackedOnly" be set in the context of the calling service (in this case, quickShipEntireOrder), or should the check on setPackedOnly be changed to check parameters.setPackedOnly?
Thanks,
Darrell
|