Bugzilla – Attachment 163947 Details for
Bug 11300
Add a new authority linker which searches for authority links on a Z39.50 server.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11300: (Fix) Z3950Server.pm, deleting Biblio.pm.rej and adding a new atomicupdate
Bug-11300-Fix-Z3950Serverpm-deleting-Bibliopmrej-a.patch (text/plain), 5.55 KB, created by
Hammat wele
on 2024-03-26 17:41:16 UTC
(
hide
)
Description:
Bug 11300: (Fix) Z3950Server.pm, deleting Biblio.pm.rej and adding a new atomicupdate
Filename:
MIME Type:
Creator:
Hammat wele
Created:
2024-03-26 17:41:16 UTC
Size:
5.55 KB
patch
obsolete
>From bbdfc27043db1e506142915eacf679bfee6bb32a Mon Sep 17 00:00:00 2001 >From: Hammat Wele <hammat.wele@inlibro.com> >Date: Tue, 26 Mar 2024 17:39:46 +0000 >Subject: [PATCH] Bug 11300: (Fix) Z3950Server.pm, deleting Biblio.pm.rej and > adding a new atomicupdate > >To test: >1. Apply the patch >2. Set the preference LinkerModule to Z39.50 Server >3. Set the preference LinkerZ3950Server to LIBRARY OF CONGRESS SUBJECTS >4. Set the preference LinkerOptions to local_first >5. Verify that your local authorities include 'Perl (Computer program language)' but do not include 'Scripting languages (Computer science)' >6. Cataloging > New record >7. In tab 6, field 650, paste Perl (Computer program language) in subfield a and click 'Link authorities automatically' - you should be told '650 - A matching authority was found in the local database.' which verifies that authority linking currently works at all. >8. Clear the 650 by clicking the 'Delete this tag' icon with the red X at the end of the tag description, and paste 'Scripting languages (Computer science)' in subfield a and click 'Link authorities automatically' > ---> you should be told 'A matching authority record was found on the Z39.50 server and was imported locally.' > ---> you should also find the imported authority in your local authorities > >This test is based on Subject field 650a it should also work with other field (100a, 110a ...) with a valid Z39.50 Server >--- > C4/Biblio.pm.rej | 20 ------------------- > C4/Linker/Z3950Server.pm | 5 ++--- > .../Bug11300_LinkerZ3950Server_syspef.sql | 9 --------- > .../data/mysql/atomicupdate/bug_11300.pl | 14 +++++++++++++ > 4 files changed, 16 insertions(+), 32 deletions(-) > delete mode 100644 C4/Biblio.pm.rej > delete mode 100644 installer/data/mysql/atomicupdate/Bug11300_LinkerZ3950Server_syspef.sql > create mode 100644 installer/data/mysql/atomicupdate/bug_11300.pl > >diff --git a/C4/Biblio.pm.rej b/C4/Biblio.pm.rej >deleted file mode 100644 >index dc41b7d742..0000000000 >--- a/C4/Biblio.pm.rej >+++ /dev/null >@@ -1,20 +0,0 @@ >-diff a/C4/Biblio.pm b/C4/Biblio.pm (rejected hunks) >-@@ -461,7 +462,7 @@ sub BiblioAutoLink { >- >- =head2 LinkBibHeadingsToAuthorities >- >-- my $num_headings_changed, %results = LinkBibHeadingsToAuthorities($linker, $marc, $frameworkcode, [$allowrelink, $verbose]); >-+ my $num_headings_changed, %results = LinkBibHeadingsToAuthorities($linker, $marc, $frameworkcode, [$allowrelink, $verbose, $dont_auto_create]); >- >- Links bib headings to authority records by checking >- each authority-controlled field in the C<MARC::Record> >-@@ -484,7 +485,9 @@ sub LinkBibHeadingsToAuthorities { >- my $frameworkcode = shift; >- my $allowrelink = shift; >- my $verbose = shift; >-+ my $dont_auto_create = shift; >- my %results; >-+ my $linker_default=C4::Linker::Default->new(); >- if (!$bib) { >- carp 'LinkBibHeadingsToAuthorities called on undefined bib record'; >- return ( 0, {}); >diff --git a/C4/Linker/Z3950Server.pm b/C4/Linker/Z3950Server.pm >index 5c2074012e..41a0ebf611 100644 >--- a/C4/Linker/Z3950Server.pm >+++ b/C4/Linker/Z3950Server.pm >@@ -15,8 +15,7 @@ package C4::Linker::Z3950Server; > # You should have received a copy of the GNU General Public License > # along with Koha; if not, see <http://www.gnu.org/licenses>. > >-use strict; >-use warnings; >+use Modern::Perl; > use Carp; > use MARC::Field; > use MARC::Record; >@@ -149,7 +148,7 @@ sub getZ3950Authority { > > if($server) { > my $options = ZOOM::Options->new(); >- $options->option('cclfile' => C4::Context->new()->{"serverinfo"}->{"authorityserver"}->{"ccl2rpn"}); >+ $options->option('cclfile' => C4::Context->new()->{"config"}->{"serverinfo"}->{"authorityserver"}->{"ccl2rpn"}); > $options->option('elementSetName', 'F'); > $options->option('async', 0); > $options->option('databaseName', $server->{db}); >diff --git a/installer/data/mysql/atomicupdate/Bug11300_LinkerZ3950Server_syspef.sql b/installer/data/mysql/atomicupdate/Bug11300_LinkerZ3950Server_syspef.sql >deleted file mode 100644 >index abbd51d951..0000000000 >--- a/installer/data/mysql/atomicupdate/Bug11300_LinkerZ3950Server_syspef.sql >+++ /dev/null >@@ -1,9 +0,0 @@ >-$DBversion = 'XXX'; >-if ( CheckVersion( $DBversion ) ) { >- $dbh->do(q{ >- INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) >- VALUES ('LinkerZ3950Server', '', NULL, 'Import authorities from this Z39.50 server when searching for authority links with the Z39.50 Server linker module', 'free') >- Â}); >- >- NewVersion( $DBversion, 12446, "Add new system preference LinkerZ3950Server"); >-} >diff --git a/installer/data/mysql/atomicupdate/bug_11300.pl b/installer/data/mysql/atomicupdate/bug_11300.pl >new file mode 100644 >index 0000000000..ca59ccd38f >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_11300.pl >@@ -0,0 +1,14 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "11300", >+ description => "Import authorities from this Z39.50 server when searching for authority links with the Z39.50 Server linker module", >+ up => sub { >+ my ($args) = @_; >+ my ($dbh, $out) = @$args{qw(dbh out)}; >+ >+ $dbh->do(q{INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) VALUES ('LinkerZ3950Server', '', NULL, 'Import authorities from this Z39.50 server when searching for authority links with the Z39.50 Server linker module', 'free') }); >+ >+ say $out "Added system preference 'LinkerZ3950Server'"; >+ }, >+}; >\ No newline at end of file >-- >2.34.1
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 11300
:
23147
|
37918
|
37974
|
37975
|
37989
|
39649
|
45324
|
56542
|
56543
|
60999
|
67165
|
69096
|
69204
|
79400
|
94819
|
94875
|
111801
|
111896
|
115217
|
133496
|
136404
|
138029
|
141168
|
143292
|
148824
|
151079
|
151476
|
151477
|
155602
|
155603
|
159741
|
159742
|
163946
|
163947
|
171304
|
171689