LP#1939730 - Use original call number owning_lib when reverting items
authorMichele Morgan <mmorgan@noblenet.org>
Thu, 12 Aug 2021 18:09:41 +0000 (14:09 -0400)
committerJason Boyer <JBoyer@equinoxOLI.org>
Thu, 5 Jan 2023 13:00:11 +0000 (08:00 -0500)
When removing items with edited call numbers from a course, find or
create the resulting call number using the original call number's
owning_lib rather than the course owner.

Signed-off-by: Michele Morgan <mmorgan@noblenet.org>
Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Signed-off-by: Jane Sandberg <sandbergja@gmail.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Courses.pm

index ac6d874..3aa5d89 100644 (file)
@@ -276,7 +276,7 @@ sub _resetItemFields {
         # and other appropriate specifications
         my $dest_acn = $cat_sess->request('open-ils.cat.call_number.find_or_create',
             $authtoken, $orig_acn->label,
-            $existing_acn->record, $course_lib,
+            $existing_acn->record, $orig_acn->owning_lib,
             $existing_acn->prefix, $existing_acn->suffix,
             $existing_acn->label_class)->gather(1);
         my $acn_id = $dest_acn->{acn_id};