LP#1839341: Fix boolean save (and other issues) user/miker/lp1839341-ou-settings-editor-angular-rebase-perms-bools
authorMike Rylander <mrylander@gmail.com>
Fri, 19 Aug 2022 17:28:52 +0000 (13:28 -0400)
committerMike Rylander <mrylander@gmail.com>
Fri, 19 Aug 2022 17:41:26 +0000 (13:41 -0400)
commit58ac1b14ecd607242784d0925f96c5ff84b6fe53
treeafc6dbb183bd80a961207f601a58b89980f5b570
parent12a3c54f0301521dcb6f333c7cddee11ae06fea1
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>
Open-ILS/src/eg2/src/app/staff/admin/local/org-unit-settings/org-unit-settings.component.ts