Bugzilla – Attachment 72031 Details for
Bug 13412
Allow configuration of auto-created authorities
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Add 2 new system preferences: GenerateAuthorityField
Bug-13412-Allow-configuration-of-auto-created-author.patch (text/plain), 5.03 KB, created by
Roch D'Amour
on 2018-02-21 16:42:40 UTC
(
hide
)
Description:
Add 2 new system preferences: GenerateAuthorityField
Filename:
MIME Type:
Creator:
Roch D'Amour
Created:
2018-02-21 16:42:40 UTC
Size:
5.03 KB
patch
obsolete
>From f8bfe9f27bac31dae688a7522805ea45cb15f8c0 Mon Sep 17 00:00:00 2001 >From: Roch D'Amour <roch.damour@inlibro.com> >Date: Wed, 21 Feb 2018 10:55:35 -0500 >Subject: [PATCH] Bug 13412 - Allow configuration of auto-created authorities > >--- > C4/Biblio.pm | 4 ++-- > .../bug_13412-add_GenerateAuthorityField_syspref.sql | 4 ++++ > installer/data/mysql/sysprefs.sql | 4 +++- > .../prog/en/modules/admin/preferences/authorities.pref | 12 ++++++++++++ > 4 files changed, 21 insertions(+), 3 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_13412-add_GenerateAuthorityField_syspref.sql > >diff --git a/C4/Biblio.pm b/C4/Biblio.pm >index dac0656..86e581a 100644 >--- a/C4/Biblio.pm >+++ b/C4/Biblio.pm >@@ -577,7 +577,7 @@ sub LinkBibHeadingsToAuthorities { > $marcrecordauth->insert_fields_ordered( > MARC::Field->new( > '667', '', '', >- 'a' => "Machine generated authority record." >+ 'a' => C4::Context->preference('GenerateAuthorityField667') > ) > ); > my $cite = >@@ -587,7 +587,7 @@ sub LinkBibHeadingsToAuthorities { > $cite =~ s/^[\s\,]*//; > $cite =~ s/[\s\,]*$//; > $cite = >- "Work cat.: (" >+ C4::Context->preference('GenerateAuthorityField670') . ": (" > . ( $library ? $library->get_effective_marcorgcode : C4::Context->preference('MARCOrgCode') ) . ")" > . $bib->subfield( '999', 'c' ) . ": " > . $cite; >diff --git a/installer/data/mysql/atomicupdate/bug_13412-add_GenerateAuthorityField_syspref.sql b/installer/data/mysql/atomicupdate/bug_13412-add_GenerateAuthorityField_syspref.sql >new file mode 100644 >index 0000000..6ed0dff >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_13412-add_GenerateAuthorityField_syspref.sql >@@ -0,0 +1,4 @@ >+INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES >+( 'GenerateAuthorityField667', 'Machine generated authority record', NULL, 'When AutoCreateAuthorities is enabled, use this as a default value', 'free' ), >+( 'GenerateAuthorityField670', 'Work cat.', NULL, 'When BiblioAddsAuthorities and AutoCreateAuthorities are enabled, use this as a default value for the 670$a field', 'free' ) >+ >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 8f5e94b..d1e881f 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -602,5 +602,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('XSLTListsDisplay','default','','Enable XSLT stylesheet control over lists pages display on intranet','Free'), > ('XSLTResultsDisplay','default','','Enable XSL stylesheet control over results page display on intranet','Free'), > ('z3950AuthorAuthFields','701,702,700',NULL,'Define the MARC biblio fields for Personal Name Authorities to fill biblio.author','free'), >-('z3950NormalizeAuthor','0','','If ON, Personal Name Authorities will replace authors in biblio.author','YesNo') >+('z3950NormalizeAuthor','0','','If ON, Personal Name Authorities will replace authors in biblio.author','YesNo'), >+( 'GenerateAuthorityField667', 'Machine generated authority record', NULL, 'When BiblioAddsAuthorities and AutoCreateAuthorities are enabled, use this as a default value for the 670$a field', 'free' ), >+( 'GenerateAuthorityField670', 'Work cat.', NULL, 'When BiblioAddsAuthorities and AutoCreateAuthorities are enabled, use this as a default value for the 670$a field', 'free' ) > ; >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 cc63205..7069017 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 >@@ -55,6 +55,18 @@ Authorities: > "loose": loose > "strict": strict > - mode. In strict mode subfields that are not found in the authority record, are deleted. Loose mode will keep them. Loose mode is the historical behavior and still the default. >+ - >+ - When BiblioAddsAuthorities and AutoCreateAuthorities are enabled, use this as a default value for the 667$a field >+ - pref: GenerateAuthorityField667 >+ default: "Machine generated authority record" >+ type: textarea >+ class: code >+ - >+ - When BiblioAddsAuthorities and AutoCreateAuthorities are enabled, use this as a default value for the 670$a field >+ - pref: GenerateAuthorityField670 >+ default: "Work cat." >+ type: textarea >+ class: code > > Linker: > - >-- >2.7.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 13412
:
72031
|
99710
|
133607
|
134266
|
134267
|
134268
|
134269