From abfc05b396a13c289eb886091d9452412efd07ce 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 Signed-off-by: Carol Witt --- .../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 805f88835c..d4f41d4ca3 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 @@ -719,9 +719,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