From 41e74dc9e5a005f942dace06fb2724f53995d047 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Fri, 9 Sep 2022 17:44:46 -0400 Subject: [PATCH] LP#1980887: fixes cases where shelving location selector didn't work This patch fixes an issue where the Angular shelving location selection component (eg-item-location-select) wouldn't work (in particular, when its contextOrgIds wasn't set, as opposed to contextOrgId). Coding note: TypeScript confounds the Perl programmer: an empty array evaulates to true; .length needs to be checked instead. To test ------- [1] Apply the patch. [2] Verify that the shelving location selector works in the following interfaces: - Acquisitions Administration -> Distribution Formuals - Course Materials (in the material form for a course) - Linked locations for Circulation Limit Sets Signed-off-by: Galen Charlton Signed-off-by: Jane Sandberg Signed-off-by: Michele Morgan --- .../app/share/item-location-select/item-location-select.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Open-ILS/src/eg2/src/app/share/item-location-select/item-location-select.component.ts b/Open-ILS/src/eg2/src/app/share/item-location-select/item-location-select.component.ts index 82490a249f..1cced45fa2 100644 --- a/Open-ILS/src/eg2/src/app/share/item-location-select/item-location-select.component.ts +++ b/Open-ILS/src/eg2/src/app/share/item-location-select/item-location-select.component.ts @@ -179,7 +179,7 @@ export class ItemLocationSelectComponent setFilterOrgs(): Promise { let contextOrgIds: number[] = []; - if (this.contextOrgIds) { + if (this.contextOrgIds.length) { contextOrgIds = this.contextOrgIds; } else { contextOrgIds = [this.contextOrgId || this.auth.user().ws_ou()]; -- 2.11.0