findOrdersToPickMove: EntityListIterator not closed if no Picklist generated
----------------------------------------------------------------------------

                 Key: OFBIZ-4105
                 URL: https://issues.apache.org/jira/browse/OFBIZ-4105
             Project: OFBiz
          Issue Type: Bug
          Components: order
    Affects Versions: SVN trunk
            Reporter: Paul Foxworthy
            Priority: Minor
             Fix For: SVN trunk


Got to ordermgr/control/orderview for an order that doesn't have stock ready 
for picking.
Click on Prink Pick Sheet
You'll get a Pick Sheet PDF with the message "Order not ready for picking, 
needs stock move"
Look at logs, you'll see an EntityListIterator was created and never closed, so 
a warning message was logged when the finalize was executed.

The problem is in

applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml

There's a <use-iterator/> for the OrderHeaderAndItemFacilityLocation entity.

After the entity-conditon is created, there's an <if> element, and the iterator 
is only used when the "if" condition is false, i.e. the <else> part is executed.

My fix is simply to move the <entity-condition>, complete with <use-iterator>, 
within the else element so the condition is evaluated and the iterator created 
only when the iterator will be used.

I'm not 100% sure this is the best fix and would appreciate some feedback.



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to