From c4a1ee2b3494b70f0e803d20c2c9f5a4694e5cd4 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 Signed-off-by: David Nind --- ...6616_-_add_LinkEstablishedHeadings_syspref.pl | 16 ++++++++++++++++ installer/data/mysql/mandatory/sysprefs.sql | 1 + .../modules/admin/preferences/authorities.pref | 7 +++++++ 3 files changed, 24 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 0000000000..1e1663da53 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_36616_-_add_LinkEstablishedHeadings_syspref.pl @@ -0,0 +1,16 @@ +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 dffaaadd49..a8578b5aa2 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -373,6 +373,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 484368fffe..1e50616409 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 via the authority plugin search results when cataloguing. Reference headings will be disabled and unable to be linked. Linker: - -- 2.39.2