From b5f3263aaea4905e8f99885de90fb05c51403dff Mon Sep 17 00:00:00 2001 From: Jane Sandberg Date: Fri, 14 Aug 2020 19:56:11 -0700 Subject: [PATCH] LP1849212: allow call number change when course is at a system or consortium level Signed-off-by: Jane Sandberg Signed-off-by: Michele Morgan Signed-off-by: Galen Charlton --- Open-ILS/src/eg2/src/app/staff/share/course.service.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/staff/share/course.service.ts b/Open-ILS/src/eg2/src/app/staff/share/course.service.ts index 2a81455a99..bc7f707359 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/course.service.ts +++ b/Open-ILS/src/eg2/src/app/staff/share/course.service.ts @@ -210,15 +210,17 @@ export class CourseService { }); } - updateItem(item: IdlObject, course_lib, call_number, updatingVolume) { + + updateItem(item: IdlObject, courseLib, callNumber, updatingVolume) { return new Promise((resolve, reject) => { this.pcrud.update(item).subscribe(() => { if (updatingVolume) { const cn = item.call_number(); + const callNumberLibrary = this.org.canHaveVolumes(courseLib) ? courseLib : cn.owning_lib(); return this.net.request( 'open-ils.cat', 'open-ils.cat.call_number.find_or_create', - this.auth.token(), call_number, cn.record(), - course_lib, cn.prefix(), cn.suffix(), + this.auth.token(), callNumber, cn.record(), + callNumberLibrary, cn.prefix(), cn.suffix(), cn.label_class() ).subscribe(res => { const event = this.evt.parse(res); -- 2.11.0