From 7239f3e1b66d65243d8fe473256da7a53c363393 Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Sat, 13 Nov 2021 16:39:14 -0500 Subject: [PATCH] LP1883171 & LP1940663: Flesh latest inventory after checkin The checkin screen expects to get the latest inventory back, so we flesh it. This work was sponsored by NOBLE. Signed-off-by: Jason Stephenson --- .../src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm index 468c12f380..46595c1595 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm @@ -4006,6 +4006,18 @@ sub checkin_flesh_events { ); } + # Flesh the latest inventory. + # NB: This survives the unflesh_copy below. Let's keep it that way. + my $alci = $self->editor->search_asset_latest_inventory([ + {copy=>$self->copy->id}, + {flesh => 1, + flesh_fields => { + alci => ['inventory_workstation'] + }}]); + if ($alci && $alci->[0]) { + $self->copy->latest_inventory($alci->[0]); + } + for my $evt (@{$self->events}) { my $payload = {}; -- 2.11.0