From 3778ddfdab09d71e7ee83dbde4efd9f9cbe9fc5c Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Mon, 22 Apr 2024 05:03:12 +0000 Subject: [PATCH] Bug 36616: Add LinkEstablishedHeadings system preference --- ...616_-_add_LinkEstablishedHeadings_syspref.pl | 17 +++++++++++++++++ installer/data/mysql/mandatory/sysprefs.sql | 1 + .../modules/admin/preferences/authorities.pref | 7 +++++++ 3 files changed, 25 insertions(+) create mode 100755 installer/data/mysql/atomicupdate/bug_36616_-_add_LinkEstablishedHeadings_syspref.pl diff --git a/installer/data/mysql/atomicupdate/bug_36616_-_add_LinkEstablishedHeadings_syspref.pl b/installer/data/mysql/atomicupdate/bug_36616_-_add_LinkEstablishedHeadings_syspref.pl new file mode 100755 index 00000000000..0aff73e8202 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_36616_-_add_LinkEstablishedHeadings_syspref.pl @@ -0,0 +1,17 @@ +use Modern::Perl; + +return { + bug_number => "36616", + description => "Optionally restrict links to established headings only", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + $dbh->do( + q{ INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('LinkEstablishedHeadings', '0', NULL, 'When enabled, bibliographic records will only be able to link to established headings, as indicated by the 008/09', 'YesNo') } + ); + + say $out "Added system preference 'LinkEstablishedHeadings'"; + }, +}; + diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index 8a4008a510a..97783c5486f 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -368,6 +368,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('LinkerModule','Default','Default|FirstMatch|LastMatch','Chooses which linker module to use (see documentation).','Choice'), ('LinkerOptions','','','A pipe-separated list of options for the linker.','free'), ('LinkerRelink','1',NULL,'If ON the authority linker will relink headings that have previously been linked every time it runs.','YesNo'), +('LinkEstablishedHeadings', '0', NULL, 'When enabled, bibliographic records will only be able to link to established headings, as indicated by the 008/09', 'YesNo'), ('ListOwnerDesignated', NULL, NULL, 'Designated list owner at patron deletion', 'Free'), ('ListOwnershipUponPatronDeletion', 'delete', 'delete|transfer', 'Defines the action on their public or shared lists when patron is deleted', 'Choice'), ('LoadCheckoutsTableDelay','0','','Delay before auto-loading checkouts table on checkouts screen','Integer'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/authorities.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/authorities.pref index 484368fffec..358187cbc78 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/authorities.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/authorities.pref @@ -95,6 +95,13 @@ Authorities: - Display the MARC field/subfields - pref: AdditionalFieldsInZ3950ResultAuthSearch - " in the 'Additional fields' column of Z39.50 search results (use comma as delimiter e.g.: \"001, 035$a\")" + - + - pref: LinkEstablishedHeadings + default: no + choices: + 0: "All headings" + 1: "Only established headings, as indicated by the 008/09" + - can be linked to bibliographic records, and will show in authority plugin search results when cataloguing. Linker: - -- 2.30.2