From: Bill Erickson Date: Tue, 17 Jul 2018 17:05:44 +0000 (-0400) Subject: LP#1775466 Improve handling org_unit / boolean types X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=8c29d433b276b44cc7500a57e25e51a0017c7e8b;p=working%2FEvergreen.git LP#1775466 Improve handling org_unit / boolean types Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/eg2/src/app/core/format.service.ts b/Open-ILS/src/eg2/src/app/core/format.service.ts index e384f22e38..dfb04b21c9 100644 --- a/Open-ILS/src/eg2/src/app/core/format.service.ts +++ b/Open-ILS/src/eg2/src/app/core/format.service.ts @@ -91,7 +91,8 @@ export class FormatService { // Slightly better than a bare 't' or 'f'. // Should probably add a global true/false string. return Boolean( - value === 't' || value === 1 || value === '1' + value === 't' || value === 1 || + value === '1' || value === true ).toString(); default: diff --git a/Open-ILS/src/eg2/src/app/core/idl.service.ts b/Open-ILS/src/eg2/src/app/core/idl.service.ts index 95a92a4d82..89f8411de9 100644 --- a/Open-ILS/src/eg2/src/app/core/idl.service.ts +++ b/Open-ILS/src/eg2/src/app/core/idl.service.ts @@ -68,6 +68,11 @@ export class IdlService { if (!field.label) { field.label = field.name; } + + // Coerce 'aou' links to datatype org_unit for consistency. + if (field.datatype === 'link' && field.class === 'aou') { + field.datatype = 'org_unit'; + } }); return x;