Comment 2 for bug 1821179

Revision history for this message
Josh Stompro (u-launchpad-stompro-org) wrote :

I think this is a timing/async issue, with the promises for fleshing the call number prefix and suffix not completing before they are run through hold_data.volume = egCore.idl.toHash(hold_data.volume);

https://git.evergreen-ils.org/?p=working/Evergreen.git;a=blob;f=Open-ILS/web/js/ui/default/staff/circ/holds/app.js;hb=HEAD#l466

egHolds.local_flesh(hold_data); uses several promises to grab prefix and suffix data.

They all have to be fleshed before being sent off to print since it doesn't work for them to eventually be resolved in this use case... I think. I'm not sure how to adjust things to make that happen. Maybe use a promise.all to wait for all the various promises to complete?

It looks like local_flesh is used by printing the pull list and the hold detail view right now. The hold detail view has no problem with the promises resolving later, it just updates the display then. Maybe there should be a separate function that isn't async since the user is waiting for the data to be gathered anyway?

Or maybe the best thing would be to add the call number affixes being fleshed to the api, and remove the need to grab them later?

Add some calls to grab the data up front in
https://git.evergreen-ils.org/?p=Evergreen.git;a=blob;f=Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm;hb=ecfc8a7b4fc91064f334ce557f76385569927b67#l3827

On our old crusty version (3.3) the pull list detail view for one hold is missing some data also. The full call number with prefix/suffix isn't shown, and some fields that don't make sense for non captured holds are shown... but maybe the template is shared with the hold shelf?