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>
Signed-off-by: Mike Rylander <mrylander@gmail.com>