Bug 32918: ERM authorized values should be in installer/data/mysql/en/mandatory/auth_...
authorCaroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Wed, 8 Feb 2023 22:11:40 +0000 (17:11 -0500)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 27 Feb 2023 13:33:12 +0000 (13:33 +0000)
commit9a8146e44aaa5abba9b68ac2ec2626aec871a28e
treed648ce5a3d7e70e197333b2511aea8545220efe7
parent2d5bdbfa33348af53dc073cfcacd09e296b4773c
Bug 32918: ERM authorized values should be in installer/data/mysql/en/mandatory/auth_values.yml

This patch moves the authorized value insertions for ERM categories into
the language-specific auth_values.yml file.

To test:
1. Count the number of authorized values in the mandatory categories

select count(*) from authorised_values where category in ('YES_NO', 'PAYMENT_TYPE', 'HSBND_FREQ', 'ERM_AGREEMENT_STATUS', 'ERM_AGREEMENT_CLOSURE_REASON', 'ERM_AGREEMENT_RENEWAL_PRIORITY', 'ERM_USER_ROLES', 'ERM_LICENSE_TYPE', 'ERM_LICENSE_STATUS', 'ERM_AGREEMENT_LICENSE_STATUS', 'ERM_AGREEMENT_LICENSE_LOCATION', 'ERM_PACKAGE_TYPE', 'ERM_PACKAGE_CONTENT_TYPE', 'ERM_TITLE_PUBLICATION_TYPE', 'COUNTRY', 'LANG', 'qualif');

--> There should be 929

2. Delete the authorized values from these categories

delete from authorised_values where category in ('YES_NO', 'PAYMENT_TYPE', 'HSBND_FREQ', 'ERM_AGREEMENT_STATUS', 'ERM_AGREEMENT_CLOSURE_REASON', 'ERM_AGREEMENT_RENEWAL_PRIORITY', 'ERM_USER_ROLES', 'ERM_LICENSE_TYPE', 'ERM_LICENSE_STATUS', 'ERM_AGREEMENT_LICENSE_STATUS', 'ERM_AGREEMENT_LICENSE_LOCATION', 'ERM_PACKAGE_TYPE', 'ERM_PACKAGE_CONTENT_TYPE', 'ERM_TITLE_PUBLICATION_TYPE', 'COUNTRY', 'LANG', 'qualif');

3. Apply patch
4. Load the mandatory authorized values

./misc/load_yaml.pl --file installer/data/mysql/en/mandatory/auth_values.yml --load

5. Redo step 1
   --> There should be the same number (929)
6. Update translations

cd misc/translator
./translate update xx-XX

7. Search the po/xx-XX-installer.po file for any of the loaded
   authorized values

   For example,

   grep "Abstract and index" po/xx-XX-installer.po

   --> descriptions should be translatable

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ff18e46ca64bc729704668ca231b04fecc55551e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
installer/data/mysql/en/mandatory/auth_values.yml
installer/data/mysql/mandatory/auth_val_cat.sql