LP#1975596: reduce parallel requests initiated by AngularJS holdings editor user/gmcharlt/lp1975596_reduce_parallel_reqs_angularjs_holdings_editor
authorGalen Charlton <gmc@equinoxOLI.org>
Mon, 23 May 2022 23:06:48 +0000 (19:06 -0400)
committerGalen Charlton <gmc@equinoxOLI.org>
Tue, 24 May 2022 14:04:38 +0000 (10:04 -0400)
commit169df35779d79a43f783e58d68c3fa3e30c7ac28
tree4817073c844f77a82c30bea843a1ac1e4cd37942
parent874f426f8f37fea1c09b51b114f1eb8709f6dbf6
LP#1975596: 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