From: Bill Erickson Date: Fri, 8 Jul 2022 21:46:40 +0000 (-0400) Subject: LP1956627 Copy editor shows full org path of copy locations X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=refs%2Fheads%2Fuser%2Fberick%2Flp1956627-volcopy-locations-full-org-path;p=working%2FEvergreen.git 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 --- 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())); } }