LP#1839341: Fix boolean save (and other issues)
authorMike Rylander <mrylander@gmail.com>
Fri, 19 Aug 2022 17:28:52 +0000 (13:28 -0400)
committerJane Sandberg <sandbergja@gmail.com>
Thu, 13 Oct 2022 16:04:01 +0000 (09:04 -0700)
commitc169d4d327e4ab417d985d591da11199399bda64
tree53c1e0f8e72bc09a8b9ecf4edeee49e6c19937d7
parentc2c5cfc19f1dc3396f7ff71505a54064937e0d54
LP#1839341: Fix boolean save (and other issues)

This commit makes sure that YAOUSen of type 'bool' are saved as JSON
booleans rather than one of the strings "true" or "false".  A database
cleanup script may be useful to make sure that erroneously set values
from earlier iterations of this interface don't stick around and cause
problems.  A simple version of this would be:

UPDATE  actor.org_unit_setting
  SET   value = BTRIM(value,'"')
  WHERE value IS NOT NULL
        AND name IN (
                SELECT  name
                  FROM  config.org_unit_setting_type
                  WHERE datatype ='bool'
        );

Also addressed in this commit are linked field label display (see the
Acquisitions "Default copy location" setting) and a minor low-level call
that requests too-deep object fleshing.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Signed-off-by: Jane Sandberg <sandbergja@gmail.com>
Open-ILS/src/eg2/src/app/staff/admin/local/org-unit-settings/org-unit-settings.component.ts