LP#1930617: reduce parallel requests initiated by AngularJS holdings editor
authorGalen Charlton <gmc@equinoxOLI.org>
Mon, 23 May 2022 23:06:48 +0000 (19:06 -0400)
committerChris Sharp <csharp@georgialibraries.org>
Mon, 15 Aug 2022 18:27:18 +0000 (14:27 -0400)
commit17bcfd737da133c8f626c1f61fbfd808bfb4a5fb
tree3587737e73848f478ed38384819e24ba5858b4f2
parent6ba5a10ed7d335cc7c7e275d082dd88261e5f337
LP#1930617: reduce parallel requests initiated by AngularJS holdings editor

This patch decreases the number of parallel requests spawned by the
AngularJS holdings editor. This can reduce load on open-ils.pcrud when
the editor is used to handle a large number of items in one batch.

This patch takes the following approaches:

- the fetching of call number affixes now only makes one request
  per relevant org unit
- item alerts are now retrieved via fleshing when the batch of items
  is requested (as opposed to doing a PCRUD request for each copy)
- fetching monograph parts is now done serially

To test
-------
[1] Apply the patch.
[2] Create a bucket with a few hundred items and edit all of them
    in the AngularJS holdings editor (which is what you get when
    you edit items from the bucket interface).
[3] Verify that the editing loads itself without causing errors
    or PCRUD drone spikes.
[4] Verify that item alerts and monograph parts are loaded
[5] Verify that the call number prefix and suffix drop-downs
    are correctly populated.
[6] Verify that copy alerts can be attached to newly-created items
    and saved.

Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js