LP1913604: course materials module shouldn't move items to different owning libs
authorJane Sandberg <js7389@princeton.edu>
Thu, 19 May 2022 21:04:05 +0000 (15:04 -0600)
committerMichele Morgan <mmorgan@noblenet.org>
Tue, 18 Oct 2022 20:51:17 +0000 (16:51 -0400)
To test:
1) Create a course that can have volumes (e.g. a branch or bookmobile, not a consortium)
2) Associate an item with that course that is from a different branch
3) Note that the item's owning and circ libraries have not changed.

Signed-off-by: Jane Sandberg <js7389@princeton.edu>
Signed-off-by: Michele Morgan <mmorgan@noblenet.org>

Open-ILS/src/eg2/src/app/staff/share/course.service.ts

index 5376638..3baa871 100644 (file)
@@ -224,13 +224,12 @@ export class CourseService {
 
     updateItem(item: IdlObject, courseLib: IdlObject, callNumber: string, updatingVolume: boolean) {
         const cn = item.call_number();
-        const callNumberLibrary = this.org.canHaveVolumes(courseLib) ? courseLib.id() : cn.owning_lib();
 
         const itemObservable = this.pcrud.update(item);
         const callNumberObservable = this.net.request(
             'open-ils.cat', 'open-ils.cat.call_number.find_or_create',
             this.auth.token(), callNumber, cn.record(),
-            callNumberLibrary, cn.prefix(), cn.suffix(),
+            cn.owning_lib(), cn.prefix(), cn.suffix(),
             cn.label_class()
         ).pipe(switchMap(res => {
             const event = this.evt.parse(res);