LP#1482400: when activating a PO, provide better progress updates
authorGalen Charlton <gmc@esilibrary.com>
Thu, 6 Aug 2015 22:15:54 +0000 (22:15 +0000)
committerGalen Charlton <gmc@esilibrary.com>
Tue, 18 Aug 2015 01:02:55 +0000 (01:02 +0000)
commite82cd06c83fb3976ce4816996f9383aa02600711
tree9323fa626cae4287d376ca07de205719af701ee0
parent6d53ac9b3b6927dbdf25488f5d6234540f0af0fc
LP#1482400: when activating a PO, provide better progress updates

This patch improves how progress is reported during the activation
of a purchase order that has a large number of assets (bibs and
copies) to create.  Specifically, it:

[1] Shows a progress bar during the asset creation phase.
[2] Calculates a linear throttle for updating the record counts
    widget. The value is based on the maximum number of bibs and
    items that could be created during the activation, divided by 20
    (which is an empirically derived number of streaming responses
    that can be sent back before the XUL client starts having
    difficulty).
[3] During the asset-creation phase, the number of records created is
    displayed above the progress bar.
[4] Adds a title to the progress bar that's displayed during the
    second phase of order activation.

To test, after applying the patch:

[1] Create a purchase order that has a large number of
    brief bibs and copies to create during activation.  For
    example, 30 line items and 60 copies.
[2] Activate the purchase order.  You should see the following
    after entering the record import queue and submitting:

    (a) Progress dialog whose title is "Creating bib, call number,
        and copy records.."
    (b) The progress dialog displays and updates text above the
        progress bar indicating how many records it has processed,
        e.g., "Bib Records Merged/Import: 25"
    (b) The record update counts should be updated at a regular
        frequency.
    (c) When the asset creation phase is done, the progress bar's
        title should change to "Activating purchase order..."

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm
Open-ILS/web/js/dojo/openils/acq/nls/acq.js
Open-ILS/web/js/dojo/openils/widget/ProgressDialog.js
Open-ILS/web/js/ui/default/acq/common/li_table.js
Open-ILS/web/js/ui/default/acq/po/view_po.js