From f3a93955e6a88f87674d8e1583e6ccbf40a848f2 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Wed, 1 Jul 2020 13:26:10 +0000 Subject: [PATCH] Bug 24544: Database revision for two new preferences Content-Type: text/plain; charset=utf-8 We add PID_Domain and PID_Field here. Test plan: Run install or upgrade. Signed-off-by: Marcel de Rooy --- installer/data/mysql/atomicupdate/bug24544.perl | 11 +++++++++++ installer/data/mysql/sysprefs.sql | 2 ++ .../prog/en/modules/admin/preferences/admin.pref | 12 ++++++++++++ 3 files changed, 25 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug24544.perl diff --git a/installer/data/mysql/atomicupdate/bug24544.perl b/installer/data/mysql/atomicupdate/bug24544.perl new file mode 100644 index 0000000000..c29b6e1900 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug24544.perl @@ -0,0 +1,11 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + $dbh->do( q| + INSERT IGNORE INTO systempreferences ( variable, value, options, explanation, type ) VALUES + ('PID_Domain', '', NULL , 'Domain name for your persistent identifiers', 'Free'), + ('PID_Field', '', NULL , 'Controls if and where persistent identifiers are used', 'Free') + |); + + # Always end with this (adjust the bug info) + NewVersion( $DBversion, 24544, "Insert prefs PID_Domain, PID_Field"); +} diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index d67a02b367..8f7ad04111 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -506,6 +506,8 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('PayPalSandboxMode', '1', NULL , 'If enabled, the system will use PayPal''s sandbox server for testing, rather than the production server.', 'YesNo'), ('PayPalSignature', '', NULL , 'Your PayPal API signature', 'Free'), ('PayPalUser', '', NULL , 'Your PayPal API username ( email address )', 'Free'), +('PID_Domain', '', NULL , 'Domain name for your persistent identifiers', 'Free'), +('PID_Field', '', NULL , 'Controls if and where persistent identifiers are used', 'Free'), ('PrefillGuaranteeField', 'phone,email,streetnumber,address,city,state,zipcode,country', NULL, 'Prefill these fields in guarantee member entry form from guarantor patron record', 'Multiple'), ('PrefillItem','0','','When a new item is added, should it be prefilled with last created item values?','YesNo'), ('PreserveSerialNotes','1','','When a new "Expected" issue is generated, should it be prefilled with last created issue notes?','YesNo'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref index d2255fdf3f..007d2536ce 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref @@ -451,3 +451,15 @@ Administration: "ARRAY": "Searchable array" -
ISO2709 format is recommended as it is faster and takes less space, whereas array format makes the full MARC record searchable. -
NOTE: Making the full record searchable may have a negative effect on relevance ranking of search results. + Persistent identifiers: + - + - "Use the following domain for your own persistent identifiers: " + - pref: PID_Domain + default: "" + - "
Note: The preference is primarily used to recognize your identifiers, not to create them." + - + - "Specify MARC fields for categories (auth, biblio or item) where you want to use persistent identifiers: " + - pref: PID_Field + default: "" + - "
Use this format [auth:024[$a],][biblio:024[$a],][item] or leave empty for not including identifiers. Item does not have a field." + - "
For instance biblio:024$a,item means that you want identifiers in biblio records (using field 024a) and items. In MARC21 tag 024 is a good choice, as tag 003 is in UNIMARC, but you may configure alternatives here too." -- 2.11.0