From 5e42927eec4dc9f3f7f8a75a202f78f70424d4a0 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Fri, 8 Jul 2022 17:46:40 -0400 Subject: [PATCH] LP1956627 Copy editor shows full org path of copy locations Copy location selector in the copy editor now includes locations from all org units above, at, and below the workstation org unit. Previously, copy locations at "lower" org units were not included. Signed-off-by: Bill Erickson --- .../eg2/src/app/staff/cat/volcopy/copy-attrs.component.html | 2 +- .../src/eg2/src/app/staff/cat/volcopy/copy-attrs.component.ts | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/staff/cat/volcopy/copy-attrs.component.html b/Open-ILS/src/eg2/src/app/staff/cat/volcopy/copy-attrs.component.html index 2479ca6b1a..f312fe8e37 100644 --- a/Open-ILS/src/eg2/src/app/staff/cat/volcopy/copy-attrs.component.html +++ b/Open-ILS/src/eg2/src/app/staff/cat/volcopy/copy-attrs.component.html @@ -151,7 +151,7 @@
diff --git a/Open-ILS/src/eg2/src/app/staff/cat/volcopy/copy-attrs.component.ts b/Open-ILS/src/eg2/src/app/staff/cat/volcopy/copy-attrs.component.ts index e04a2bc3ba..c41831d93e 100644 --- a/Open-ILS/src/eg2/src/app/staff/cat/volcopy/copy-attrs.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/cat/volcopy/copy-attrs.component.ts @@ -661,9 +661,16 @@ export class CopyAttrsComponent implements OnInit, AfterViewInit { this.batchAttrs.filter(attr => attr.editing).forEach(attr => attr.save()); } - affectedOrgIds(): number[] { + copyLocationOrgs(): number[] { if (!this.context) { return []; } - return this.context.orgNodes().map(n => n.target.id()); + + // Make sure every org unit represented by the edit batch + // is represented. + const ids = this.context.orgNodes().map(n => n.target.id()); + + // Make sure all locations within the "full path" of our + // workstation org unit are included. + return ids.concat(this.org.fullPath(this.auth.user().ws_ou())); } } -- 2.11.0