You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "David E. Jones (JIRA)" <ji...@apache.org> on 2009/04/29 15:41:31 UTC

[jira] Commented: (OFBIZ-2388) Add a page that shows orders with the "pick sheet printed date" field

    [ https://issues.apache.org/jira/browse/OFBIZ-2388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12704114#action_12704114 ] 

David E. Jones commented on OFBIZ-2388:
---------------------------------------

The way this is implemented will not scale adequately for deployments with large numbers of orders.

In the ReviewOrdersNotPickedOrPacked.groovy file the first line of code gets ALL OrderHeader records from the database, ie:

orderHeaders = delegator.findList("OrderHeader", null, null, null, null, false);

This is not acceptable as there could be hundreds of thousands of millions of orders in the database, and so this line will fail.

Later on down in the file the code looks for Shipment records with a primaryOrderId that matches the orderId on each OrderHeader, and then looks at other things on the Shipment record(s) corresponding.

All of this can, and should, be done with a view entity. In fact, it must be done with a view entity so that the work is done in a query in the database and not in a script on the app server which is hugely inefficient, so much so that in even moderately large systems it simply WILL NOT WORK!

An addition note: looking for shipments by matching the OrderHeader.orderId with the Shipment.primaryOrderId is not adequate. Please change it to match the OrderHeader.orderId with the ItemIssuance.orderId and then ItemIssuance.shipmentId with Shipment.shipmentId. Not that there will be many records for a single OrderHeader and Shipment combination since the ItemIssuance really ties a OrderItem to a ShipmentItem, but that is fine since in this case all we care about is the OrderHeader to Shipment relationship. Why do we need this? Because it is possible for a single Shipment to have items from different orders on it, and simply looking at the Shipment.primaryOrderId won't capture that... that field is only the PRIMARY orderId.

> Add a page that shows orders with the "pick sheet printed date" field
> ---------------------------------------------------------------------
>
>                 Key: OFBIZ-2388
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-2388
>             Project: OFBiz
>          Issue Type: Sub-task
>          Components: product
>    Affects Versions: SVN trunk
>            Reporter: Pranay Pandey
>            Assignee: Vikas Mayur
>             Fix For: SVN trunk
>
>         Attachments: ofbiz-2388.patch
>
>
> *  Add page that shows orders with the "pick sheet printed date" field set that do not have a Shipment associated with them that is in the "Input" or "Scheduled" statuses (should be in Input status, but just in case Scheduled is eventually used), sorted by the oldest date first to see the ones that have gone the longest without being picked and verified.
> * Link to new page from the PicklistOptions page.

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