Created attachment 23147 [details] [review] Add a Z39.50 Linker that searches for authority links in the specified Z39.50 server. This patch adds a Z39.50 Linker which searches for authority links on a remote server. If a matching authority is found, it's imported in the local database for linking with the current biblio record. If no matching authority was found on the remote server, the Linker falls back to a local authority search. Configuration : * The option "Z39.50 Server" is added to the LinkerModule preference. You must choose this to use the new Linker. * The preference LinkerZ3950Server is required and specifies which server to use for linking. It must contain the "name" of the server, as defined in the z3950servers table. * You can set the "local_first" option in the LinkerOptions preference to force the Linker to search for authorities in the local database first. If no local authority match was found, the Linker falls back to a remote Z39.50 search. This patch depends on code added in Bug 11299, and must be applied after it. Sponsored-by: CCSR ( http://www.ccsr.qc.ca )
Nice feature, but I can't test the patch on a sandbox. Some problems occurred applying patches from bug 11299 11300: <h1>Something went wrong !</h1>Applying: Add a Z39.50 Linker that searches for authority links in the specified Z39.50 server. Also modifies the automatic linker button so it won't create empty authorities when used. fatal: sha1 information is lacking or useless (C4/Biblio.pm). Repository lacks necessary blobs to fall back on 3-way merge. Cannot fall back to three-way merge. Patch failed at 0001 Add a Z39.50 Linker that searches for authority links in the specified Z39.50 server. Also modifies the automatic linker button so it won't create empty authorities when used. When you have resolved this problem run git bz apply --continue. If you would prefer to skip this patch, instead run git bz apply --skip. To restore the original branch and stop patching run git bz apply --abort. Bug 11300 - Add a new authority linker which searches for authority links on a Z39.50 server. 23147 - Add a Z39.50 Linker that searches for authority links in the specified Z39.50 server.
Created attachment 37918 [details] [review] Bug 11300 - Add a Z39.50 Linker that searches for authority links in the specified Z39.50 server This patch depends on code added in Bug 11299, and must be applied after it. Sponsored-by: CCSR ( http://www.ccsr.qc.ca ) This patch adds a Z39.50 Linker which searches for authority links on a remote server. If a matching authority is found, it's imported in the local database for linking with the current biblio record. If no matching authority was found on the remote server, the Linker falls back to a local authority search. Configuration : * The option "Z39.50 Server" is added to the LinkerModule preference. You must choose this to use the new Linker. * The preference LinkerZ3950Server is required and specifies which server to use for linking. It must contain the "name" of the server, as defined in the z3950servers table. * You can set the "local_first" option in the LinkerOptions preference to force the Linker to search for authorities in the local database first. If no local authority match was found, the Linker falls back to a remote Z39.50 search.
I rebased the patch, on top of bz 11299. I fixed the issues spotted by qa-test. This now applies cleanly. ***** Remember to first apply 11299 before *****
Created attachment 37974 [details] [review] Bug 11300 - Add a Z39.50 Linker that searches for authority links in the specified Z39.50 server This patch depends on code added in Bug 11299, and must be applied after it. Sponsored-by: CCSR ( http://www.ccsr.qc.ca ) This patch adds a Z39.50 Linker which searches for authority links on a remote server. If a matching authority is found, it's imported in the local database for linking with the current biblio record. If no matching authority was found on the remote server, the Linker falls back to a local authority search. Configuration : * The option "Z39.50 Server" is added to the LinkerModule preference. You must choose this to use the new Linker. * The preference LinkerZ3950Server is required and specifies which server to use for linking. It must contain the "name" of the server, as defined in the z3950servers table. * You can set the "local_first" option in the LinkerOptions preference to force the Linker to search for authorities in the local database first. If no local authority match was found, the Linker falls back to a remote Z39.50 search.
Created attachment 37975 [details] [review] Bug 11300 - correcting table z3950servers now uses 'servername' instead of 'name'
Rebased over 11299, and small fixes added in new patch
Created attachment 37989 [details] [review] Bug 11300 - Add update_cache method to C4::Linker::Z3950Server to match definition
Created attachment 39649 [details] [review] Bug 11300 - Add missing parameter in call to LinkBibHeadingsToAuthorities
Created attachment 45324 [details] [review] Bug 11300 - Add a Z39.50 Linker that searches for authority links in the specified Z39.50 server This patch depends on code added in Bug 11299, and must be applied after it. Sponsored-by: CCSR ( http://www.ccsr.qc.ca ) This patch adds a Z39.50 Linker which searches for authority links on a remote server. If a matching authority is found, it's imported in the local database for linking with the current biblio record. If no matching authority was found on the remote server, the Linker falls back to a local authority search. Configuration : * The option "Z39.50 Server" is added to the LinkerModule preference. You must choose this to use the new Linker. * The preference LinkerZ3950Server is required and specifies which server to use for linking. It must contain the "name" of the server, as defined in the z3950servers table. * You can set the "local_first" option in the LinkerOptions preference to force the Linker to search for authorities in the local database first. If no local authority match was found, the Linker falls back to a remote Z39.50 search.
Could you rebase please?
Created attachment 56542 [details] [review] Bug 11300 - Add a Z39.50 Linker that searches for authority links in the specified Z39.50 server This patch depends on code added in Bug 11299, and must be applied after it. Sponsored-by: CCSR ( http://www.ccsr.qc.ca ) This patch adds a Z39.50 Linker which searches for authority links on a remote server. If a matching authority is found, it's imported in the local database for linking with the current biblio record. If no matching authority was found on the remote server, the Linker falls back to a local authority search. Configuration : * The option "Z39.50 Server" is added to the LinkerModule preference. You must choose this to use the new Linker. * The preference LinkerZ3950Server is required and specifies which server to use for linking. It must contain the "name" of the server, as defined in the z3950servers table. * You can set the "local_first" option in the LinkerOptions preference to force the Linker to search for authorities in the local database first. If no local authority match was found, the Linker falls back to a remote Z39.50 search.
Created attachment 56543 [details] [review] Bug 11300: small fix for adjust using first,last and default in result search, using index Match-heading for search - Rebase all patches . - Fix using first,last and default in result search. - Using index Match-heading for search z3950 server.
Created attachment 60999 [details] [review] Bug 11300 - Add a new authority linker which searches for authority links on a Z39.50 server.
Hi all, I rebase all patches and squash all in one good patch. Thanks.
Blocked by failed 11299 for now - hope we can get this moving soon!
Created attachment 67165 [details] [review] Bug 11300 - Add a new authority linker which searches for authority links on a Z39.50 server.
Rebase patch because it have conflict
Hi katrin, I change status for this patch, because 11299 it's needs signoff. Thanks. Bouzid.
Patch applies cleanly on top of bug 11299!
Comment on attachment 67165 [details] [review] Bug 11300 - Add a new authority linker which searches for authority links on a Z39.50 server. Review of attachment 67165 [details] [review]: ----------------------------------------------------------------- Hi Bouzid, noted some thing in the splinter review. Additionally: - atomicupdate for adding the system preference is missing - You will have to add tests for the new module to pass QA - QA tools show some fails: OK C4/Biblio.pm OK critic OK forbidden patterns OK git manipulation OK pod OK pod coverage OK spelling OK valid FAIL C4/Linker/Z3950Server.pm FAIL critic Found use of Switch. This module is deprecated by the Perl 5 Porters at line 223, column 5. Find an alternative module. OK forbidden patterns OK git manipulation OK pod FAIL pod coverage POD is missing for flip_heading POD is missing for getZ3950Authority POD is missing for get_link POD is missing for update_cache OK spelling OK valid OK cataloguing/automatic_linker.pl OK critic OK forbidden patterns OK git manipulation OK pod OK spelling OK valid FAIL installer/data/mysql/sysprefs.sql OK git manipulation OK semicolon FAIL sysprefs_order Not blocker: Sysprefs AdditionalFieldsInZ3950ResultSearch is bad placed (see bug 10610) - I've tried to configure and test the feature, but see an alert with an internal server error. Plack error logs show: CGI::param called in list context from package CGI::Compile::ROOT::home_vagrant_kohaclone_cataloguing_automatic_linker_2epl line 65, this can lead to vulnerabilities. See the warning in "Fetching the value or values of a single named parameter" at /usr/share/perl5/CGI.pm line 436. Personal-name,do-not-truncate,ext="K�rger, Walter Christian" ZOOM error 114 "Unsupported Use attribute" (addinfo: "Personal-name") from diag-set 'Bib-1' at /home/vagrant/kohaclone/C4/Linker/Z3950Server.pm line 260. Can't locate object method "get_link" via package "C4::Linker::Default" (perhaps you forgot to load "C4::Linker::Default"?) at /home/vagrant/kohaclone/C4/Biblio.pm line 533. ::: C4/Linker/Z3950Server.pm @@ +15,5 @@ > +# 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; Please use Modern::Perl instead! ::: installer/data/mysql/sysprefs.sql @@ +8,5 @@ > ('AcqWarnOnDuplicateInvoice','0','','Warn librarians when they try to create a duplicate invoice','YesNo'), > ('AddressFormat','us','us|de|fr','Choose format to display postal addresses', 'Choice'), > +('AdditionalFieldsInZ3950ResultSearch', '', NULL, 'Determines which MARC field/subfields are displayed in -Additional field- column in the result of a search Z3950', 'Free'), > +('AddPatronLists','categorycode','categorycode|category_type','Allow user to choose what list to pick up from when adding patrons','Choice'), > +('AddressFormat','us','','Choose format to display postal addresses', 'Choice'), I think there is a merge error here - the new pref (LinkerZ3950Server) is missing and others are doubled up.
Created attachment 69096 [details] [review] Bug 11300 - Add a new authority linker which searches for authority links on a Z39.50 server.
Created attachment 69204 [details] [review] Bug 11300 - Add a new authority linker which searches for authority links on a Z39.50 server.
Hi Katrin, I fixed : - adding atomicupdate - cleaninig sysprefs.sql - Some problem of QA tools - Use Modern::Perl - internal error server But, I do not know how to add tests for new linker, because it uses z3950 server?, any idea. Thanks
Comment on attachment 69204 [details] [review] Bug 11300 - Add a new authority linker which searches for authority links on a Z39.50 server. Review of attachment 69204 [details] [review]: ----------------------------------------------------------------- Hi Bouzid, did you attach the most recent patch? This one is not using Modern::Perl as you said in your last comment? I have taken another look at the code, some are questions: ::: C4/Linker/Z3950Server.pm @@ +1,1 @@ > +package C4::Linker::Z3950Server; I am not sure about adding a new module to the C4 namespace at this point in time, as we have been busy moving things into the new Koha namespace. This might be something to check with the Release Manager. It might be ok because of the relationship with C4::Linker. @@ +15,5 @@ > +# 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; You should always use Modern::Perl instead of use strict; use warnings; @@ +121,5 @@ > + ($authid, $record, $status) = $self->getZ3950Authority($heading); > + > + Do a Z39.50 search for the heading using the $conn ZOOM::Connection object and the $heading Heading. > + The column origincode is used to check for duplicates. > + FIXME: Use thesaurus in search? As of Koha 3.8, the community stopped using them. What's this comment referring to? @@ +167,5 @@ > + } > + my $query; > + if ($heading->{'auth_type'} eq 'PERSO_NAME' ){ > + $query =qq(Personal-name,do-not-truncate,ext="$heading->{'search_form'}"); > + }elsif ($heading->{'auth_type'} eq 'UNIF_TITLE' ) { I am not sure if these are universal or only specific to MARC21. :( @@ +214,5 @@ > + my $authtypecode = C4::AuthoritiesMarc::GuessAuthTypeCode($record); > + my $authId; > + > + # Use the control number to prevent the creation of duplicate authorities. > + my $controlNumber = $record->field('970')->subfield('0'); What is 970? I checked authority frameworks and bibliograpic frameworks but it's defined in neither? @@ +225,5 @@ > + # Corrections and verifications before insertion > + my $format; > + my $leader=' nz a22 o 4500';# Leader for incomplete MARC21 record > + > + if (uc(C4::Context->preference('marcflavour')) eq 'UNIMARC') { No need for uc() here I think. @@ +238,5 @@ > + $record->leader($leader); > + } > + if (!$record->field('003')) { > + $record->insert_fields_ordered( > + MARC::Field->new('003',C4::Context->preference('MARCOrgCode')) I think this needs to be adjusted - as of 17.11 the MARCOrgCode can also be set on library level.
Created attachment 79400 [details] [review] Bug 11300 - Add a new authority linker which searches for authority links on a Z39.50 server.
Can we add some test steps for this?
It's very useful feature, but sleep very long. Time to take it back to life?
Created attachment 94819 [details] [review] Bug 11300 - Add a new authority linker which searches for authority links on a Z39.50 server.
I rebased the bug 11299 and test this. Thanks. Bouzid.
Created attachment 94875 [details] [review] Bug 11300 - Add a new authority linker which searches for authority links on a Z39.50 server.
Any test plan? Thanks.
(In reply to Michal Denar from comment #31) > Any test plan? > > > Thanks. +1 - I'd be willing to try and test if there's a test plan. Thank you!
Since the Library of Congress has separate databases (and thus separate servers, as far as Koha is concerned) for name authorities and subject authorities, it would probably save time later on to just start out with the ability to either specify more than one LinkerZ3950Server, or to specify which server to use for each authority type.
Sorry, does not apply. Please rebase.
Created attachment 111801 [details] [review] Bug 11300 - Add a new authority linker which searches for authority links on a Z39.50 server.
All I did was rebase it over the almost-successful Bug 11299. It has not been tested and should not be evaluated.
Created attachment 111896 [details] [review] Bug 11300 - Add a new authority linker which searches for authority links on a Z39.50 server.
Created attachment 115217 [details] [review] Bug 11300: Add a new authority linker which searches for authority links on a Z39.50 server. This patch adds a Z39.50 Linker which searches for authority links on a remote server. If a matching authority is found, it's imported in the local database for linking with the current biblio record. If no matching authority was found on the remote server, the Linker falls back to a local authority search. Configuration : * The option "Z39.50 Server" is added to the LinkerModule preference. You must choose this to use the new Linker. * The preference LinkerZ3950Server is required and specifies which server to use for linking. It must contain the "name" of the server, as defined in the z3950servers table. * You can set the "local_first" option in the LinkerOptions preference to force the Linker to search for authorities in the local database first. If no local authority match was found, the Linker falls back to a remote Z39.50 search. Sponsored-by: CCSR ( http://www.ccsr.qc.ca )
Can this work with SRU target ? In France BNF only provides SRU for authorities.
Hi, if I apply patch, set linker and try to use autolinker: Error : Can't locate object method "ModZebrations" via package "C4::Context" at /kohadevbox/koha/C4/Linker/Z3950Server.pm line 151 C4::Linker::Z3950Server::getZ3950Authority('C4::Linker::Z3950Server=HASH(0x5587c5b84068)', 'C4::Heading=HASH(0x5587c5baa240)') called at /kohadevbox/koha/C4/Linker/Z3950Server.pm line 92 C4::Linker::Z3950Server::get_link('C4::Linker::Z3950Server=HASH(0x5587c5b84068)', 'C4::Heading=HASH(0x5587c5baa240)') called at /kohadevbox/koha/C4/Biblio.pm line 619 C4::Biblio::LinkBibHeadingsToAuthorities('C4::Linker::Z3950Server=HASH(0x5587c5b84068)', 'MARC::Record=HASH(0x5587c5b7a678)', '', '', undef, 1) called at /kohadevbox/koha/C4/Biblio.pm line 558 C4::Biblio::BiblioAutoLink('MARC::Record=HASH(0x5587c5b7a678)', '', 1) called at /kohadevbox/koha/svc/cataloguing/automatic_linker.pl line 45 eval {...} at /kohadevbox/koha/svc/cataloguing/automatic_linker.pl line 2 CGI::Compile::ROOT::kohadevbox_koha_svc_cataloguing_automatic_linker_2epl::__ANON__('CGI::Compile=HASH(0x5587c3772dc0)', '', '/kohadevbox/koha/svc/cataloguing/automatic_linker.pl', '/kohadevbox/koha/svc/cataloguing', 'ARRAY(0x5587c6b4b910)') called at /usr/share/perl5/CGI/Compile.pm line 151 CGI::Compile::ROOT::kohadevbox_koha_svc_cataloguing_automatic_linker_2epl::automatic_linker_2epl at /usr/share/perl5/CGI/Emulate/PSGI.pm line 30 CGI::Emulate::PSGI::__ANON__('HASH(0x5587c5d42800)') called at /usr/share/perl5/Plack/App/WrapCGI.pm line 95 Plack::App::WrapCGI::call('Plack::App::WrapCGI=HASH(0x5587c4956ac8)', 'HASH(0x5587c5d42800)') called at /usr/share/perl5/Plack/Component.pm line 50 Plack::Component::__ANON__('HASH(0x5587c5d42800)') called at /usr/share/perl5/Plack/App/CGIBin.pm line 50 Plack::App::CGIBin::serve_path('Plack::App::CGIBin=HASH(0x5587b9c4d248)', 'HASH(0x5587c5d42800)', '/kohadevbox/koha/svc/cataloguing/automatic_linker.pl') called at /usr/share/perl5/Plack/App/File.pm line 34 Plack::App::File::call('Plack::App::CGIBin=HASH(0x5587b9c4d248)', 'HASH(0x5587c5d42800)') called at /usr/share/perl5/Plack/Component.pm line 50 Plack::Component::__ANON__('HASH(0x5587c5d42800)') called at /usr/share/perl5/Plack/Middleware/LogWarn.pm line 22 Plack::Middleware::LogWarn::call('Plack::Middleware::LogWarn=HASH(0x5587c36c31a0)', 'HASH(0x5587c5d42800)') called at /usr/share/perl5/Plack/Component.pm line 50 Plack::Component::__ANON__('HASH(0x5587c5d42800)') called at /usr/share/perl5/Plack/Middleware/Log4perl.pm line 30 Plack::Middleware::Log4perl::call('Plack::Middleware::Log4perl=HASH(0x5587c369dd30)', 'HASH(0x5587c5d42800)') called at /usr/share/perl5/Plack/Component.pm line 50 Plack::Component::__ANON__('HASH(0x5587c5d42800)') called at /usr/share/perl5/Plack/Middleware/HTTPExceptions.pm line 20 Plack::Middleware::HTTPExceptions::try {...} at /usr/share/perl5/Try/Tiny.pm line 100 eval {...} at /usr/share/perl5/Try/Tiny.pm line 93 Try::Tiny::try('CODE(0x5587c62fdf40)', 'Try::Tiny::Catch=REF(0x5587c6b513a8)') called at /usr/share/perl5/Plack/Middleware/HTTPExceptions.pm line 23 Plack::Middleware::HTTPExceptions::call('Plack::Middleware::HTTPExceptions=HASH(0x5587c36c37e8)', 'HASH(0x5587c5d42800)') called at /usr/share/perl5/Plack/Component.pm line 50 Plack::Component::__ANON__('HASH(0x5587c5d42800)') called at /usr/share/perl5/Plack/Middleware/ErrorDocument.pm line 15 Plack::Middleware::ErrorDocument::call('Plack::Middleware::ErrorDocument=HASH(0x5587c368d528)', 'HASH(0x5587c5d42800)') called at /usr/share/perl5/Plack/Component.pm line 50 Plack::Component::__ANON__('HASH(0x5587c5d42800)') called at /usr/share/perl5/Plack/App/URLMap.pm line 71 Plack::App::URLMap::call('Plack::App::URLMap=HASH(0x5587c34fcbc0)', 'HASH(0x5587c5d42800)') called at /usr/share/perl5/Plack/Component.pm line 50 Plack::Component::__ANON__('HASH(0x5587c5d42800)') called at /kohadevbox/koha/Koha/Middleware/RealIP.pm line 64 Koha::Middleware::RealIP::call('Koha::Middleware::RealIP=HASH(0x5587c36a6c08)', 'HASH(0x5587c5d42800)') called at /usr/share/perl5/Plack/Component.pm line 50 Plack::Component::__ANON__('HASH(0x5587c5d42800)') called at /kohadevbox/koha/Koha/Middleware/SetEnv.pm line 104 Koha::Middleware::SetEnv::call('Koha::Middleware::SetEnv=HASH(0x5587c36bfee0)', 'HASH(0x5587c6b4acb0)') called at /usr/share/perl5/Plack/Component.pm line 50 Plack::Component::__ANON__('HASH(0x5587c6b4acb0)') called at /usr/share/perl5/Plack/Middleware/Static.pm line 18 Plack::Middleware::Static::call('Plack::Middleware::Static=HASH(0x5587c368d3f0)', 'HASH(0x5587c6b4acb0)') called at /usr/share/perl5/Plack/Component.pm line 50 Plack::Component::__ANON__('HASH(0x5587c6b4acb0)') called at /usr/share/perl5/Plack/Middleware/ReverseProxy.pm line 68 Plack::Middleware::ReverseProxy::call('Plack::Middleware::ReverseProxy=HASH(0x5587c368d798)', 'HASH(0x5587c6b4acb0)') called at /usr/share/perl5/Plack/Component.pm line 50 Plack::Component::__ANON__('HASH(0x5587c6b4acb0)') called at /usr/share/perl5/Plack/Middleware/Lint.pm line 24 Plack::Middleware::Lint::call('Plack::Middleware::Lint=HASH(0x5587b9c4d008)', 'HASH(0x5587c6b4acb0)') called at /usr/share/perl5/Plack/Component.pm line 50 Plack::Middleware::StackTrace::try {...} at /usr/share/perl5/Try/Tiny.pm line 100 eval {...} at /usr/share/perl5/Try/Tiny.pm line 93 Plack::Middleware::StackTrace::call('Plack::Middleware::StackTrace=HASH(0x5587c2353b70)', 'HASH(0x5587c6b4acb0)') called at /usr/share/perl5/Plack/Component.pm line 50 Plack::Component::__ANON__('HASH(0x5587c6b4acb0)') called at /usr/share/perl5/Plack/Middleware/AccessLog.pm line 27 Plack::Middleware::AccessLog::call('Plack::Middleware::AccessLog=HASH(0x5587c2353de0)', 'HASH(0x5587c6b4acb0)') called at /usr/share/perl5/Plack/Component.pm line 50 Plack::Component::__ANON__('HASH(0x5587c6b4acb0)') called at /usr/share/perl5/Plack/Util.pm line 145 eval {...} at /usr/share/perl5/Plack/Util.pm line 145 Plack::Util::run_app('CODE(0x5587c2353d68)', 'HASH(0x5587c6b4acb0)') called at /usr/share/perl5/Starman/Server.pm line 195 Starman::Server::dispatch_request('Starman::Server=HASH(0x5587b9669a58)', 'HASH(0x5587c6b4acb0)') called at /usr/share/perl5/Starman/Server.pm line 298 Starman::Server::process_request('Starman::Server=HASH(0x5587b9669a58)', 'Net::Server::Proto::UNIX=GLOB(0x5587c64e7f68)') called at /usr/share/perl5/Net/Server.pm line 72 Net::Server::run_client_connection('Starman::Server=HASH(0x5587b9669a58)') called at /usr/share/perl5/Net/Server/PreFork.pm line 225 eval {...} at /usr/share/perl5/Net/Server/PreFork.pm line 225 Net::Server::PreFork::run_child('Starman::Server=HASH(0x5587b9669a58)') called at /usr/share/perl5/Net/Server/PreFork.pm line 183 Net::Server::PreFork::run_n_children('Starman::Server=HASH(0x5587b9669a58)', 2) called at /usr/share/perl5/Net/Server/PreFork.pm line 107 Net::Server::PreFork::loop('Starman::Server=HASH(0x5587b9669a58)') called at /usr/share/perl5/Net/Server.pm line 58 Net::Server::run('Starman::Server=HASH(0x5587b9669a58)', 'port', 'ARRAY(0x5587b9bf82f8)', 'host', '*', 'proto', 'tcp', 'serialize', 'none', 'min_servers', 2, 'min_spare_servers', 1, 'max_spare_servers', 1, 'max_servers', 2, 'max_requests', 50, 'user', 'kohadev-koha', 'group', 'kohadev-koha', 'listen', 1024, 'check_for_waiting', 1, 'no_client_stdout', 1, 'log_file', '/var/log/koha/kohadev/plack-error.log', 'setsid', 1, 'pid_file', '/var/run/koha/kohadev/plack.pid', 'background', 1) called at /usr/share/perl5/Starman/Server.pm line 106 Starman::Server::run('Starman::Server=HASH(0x5587b9669a58)', 'CODE(0x5587b9669908)', 'HASH(0x5587b96696b0)') called at /usr/share/perl5/Plack/Handler/Starman.pm line 25 Plack::Handler::Starman::run('Plack::Handler::Starman=HASH(0x5587b9669920)', 'CODE(0x5587b9669908)') called at /usr/share/perl5/Plack/Loader/Delayed.pm line 20 Plack::Loader::Delayed::run('Plack::Loader::Delayed=HASH(0x5587b93b6570)', 'Plack::Handler::Starman=HASH(0x5587b9669920)') called at /usr/share/perl5/Plack/Runner.pm line 279 Plack::Runner::run('Plack::Runner=HASH(0x5587b93538e8)') called at /usr/bin/starman line 38
Created attachment 133496 [details] [review] Bug 11300: Add a new authority linker which searches for authority links on a Z39.50 server. This patch adds a Z39.50 Linker which searches for authority links on a remote server. If a matching authority is found, it's imported in the local database for linking with the current biblio record. If no matching authority was found on the remote server, the Linker falls back to a local authority search. Configuration : * The option "Z39.50 Server" is added to the LinkerModule preference. You must choose this to use the new Linker. * The preference LinkerZ3950Server is required and specifies which server to use for linking. It must contain the "name" of the server, as defined in the z3950servers table. * You can set the "local_first" option in the LinkerOptions preference to force the Linker to search for authorities in the local database first. If no local authority match was found, the Linker falls back to a remote Z39.50 search. Sponsored-by: CCSR ( http://www.ccsr.qc.ca )
Created attachment 136404 [details] [review] Bug 11300: Add a new authority linker which searches for authority links on a Z39.50 server. This patch adds a Z39.50 Linker which searches for authority links on a remote server. If a matching authority is found, it's imported in the local database for linking with the current biblio record. If no matching authority was found on the remote server, the Linker falls back to a local authority search. Configuration : * The option "Z39.50 Server" is added to the LinkerModule preference. You must choose this to use the new Linker. * The preference LinkerZ3950Server is required and specifies which server to use for linking. It must contain the "name" of the server, as defined in the z3950servers table. * You can set the "local_first" option in the LinkerOptions preference to force the Linker to search for authorities in the local database first. If no local authority match was found, the Linker falls back to a remote Z39.50 search. Sponsored-by: CCSR ( http://www.ccsr.qc.ca )
Would it be possible to add a test plan? I have applied the patch, set it up according to the instructions, but the authority linking does not work. Nothing happens.
Created attachment 138029 [details] [review] Bug 11300: Add a new authority linker which searches for authority links on a Z39.50 server. This patch adds a Z39.50 Linker which searches for authority links on a remote server. If a matching authority is found, it's imported in the local database for linking with the current biblio record. If no matching authority was found on the remote server, the Linker falls back to a local authority search. Configuration : * The option "Z39.50 Server" is added to the LinkerModule preference. You must choose this to use the new Linker. * The preference LinkerZ3950Server is required and specifies which server to use for linking. It must contain the "name" of the server, as defined in the z3950servers table. * You can set the "local_first" option in the LinkerOptions preference to force the Linker to search for authorities in the local database first. If no local authority match was found, the Linker falls back to a remote Z39.50 search. Sponsored-by: CCSR ( http://www.ccsr.qc.ca )
Created attachment 141168 [details] [review] Bug 11300: Add a new authority linker which searches for authority links on a Z39.50 server. This patch adds a Z39.50 Linker which searches for authority links on a remote server. If a matching authority is found, it's imported in the local database for linking with the current biblio record. If no matching authority was found on the remote server, the Linker falls back to a local authority search. Configuration : * The option "Z39.50 Server" is added to the LinkerModule preference. You must choose this to use the new Linker. * The preference LinkerZ3950Server is required and specifies which server to use for linking. It must contain the "name" of the server, as defined in the z3950servers table. * You can set the "local_first" option in the LinkerOptions preference to force the Linker to search for authorities in the local database first. If no local authority match was found, the Linker falls back to a remote Z39.50 search. Sponsored-by: CCSR ( http://www.ccsr.qc.ca )
Created attachment 143292 [details] [review] Bug 11300: Add a new authority linker which searches for authority links on a Z39.50 server. This patch adds a Z39.50 Linker which searches for authority links on a remote server. If a matching authority is found, it's imported in the local database for linking with the current biblio record. If no matching authority was found on the remote server, the Linker falls back to a local authority search. Configuration : * The option "Z39.50 Server" is added to the LinkerModule preference. You must choose this to use the new Linker. * The preference LinkerZ3950Server is required and specifies which server to use for linking. It must contain the "name" of the server, as defined in the z3950servers table. * You can set the "local_first" option in the LinkerOptions preference to force the Linker to search for authorities in the local database first. If no local authority match was found, the Linker falls back to a remote Z39.50 search. Sponsored-by: CCSR ( http://www.ccsr.qc.ca )
Hi, can you update this on master? I can test this patch. Thank you.
Created attachment 148824 [details] [review] Bug 11300: Add a new authority linker which searches for authority links on a Z39.50 server. This patch adds a Z39.50 Linker which searches for authority links on a remote server. If a matching authority is found, it's imported in the local database for linking with the current biblio record. If no matching authority was found on the remote server, the Linker falls back to a local authority search. Configuration : * The option "Z39.50 Server" is added to the LinkerModule preference. You must choose this to use the new Linker. * The preference LinkerZ3950Server is required and specifies which server to use for linking. It must contain the "name" of the server, as defined in the z3950servers table. * You can set the "local_first" option in the LinkerOptions preference to force the Linker to search for authorities in the local database first. If no local authority match was found, the Linker falls back to a remote Z39.50 search. Sponsored-by: CCSR ( http://www.ccsr.qc.ca )
Created attachment 151079 [details] [review] Bug 11300: Add a new authority linker which searches for authority links on a Z39.50 server. This patch adds a Z39.50 Linker which searches for authority links on a remote server. If a matching authority is found, it's imported in the local database for linking with the current biblio record. If no matching authority was found on the remote server, the Linker falls back to a local authority search. Configuration : * The option "Z39.50 Server" is added to the LinkerModule preference. You must choose this to use the new Linker. * The preference LinkerZ3950Server is required and specifies which server to use for linking. It must contain the "name" of the server, as defined in the z3950servers table. * You can set the "local_first" option in the LinkerOptions preference to force the Linker to search for authorities in the local database first. If no local authority match was found, the Linker falls back to a remote Z39.50 search. Sponsored-by: CCSR ( http://www.ccsr.qc.ca )
I rebased the patch
Here's a super-simple test plan, which fails. 1. Set the preference LinkerModule to Z39.50 Server 2. Set the preference LinkerZ3950Server to LIBRARY OF CONGRESS SUBJECTS 3. Set the preference LinkerOptions to local_first 4. Verify that your local authorities include "Perl (Computer program language)" but do not include "Scripting languages (Computer science)" 5. Cataloging > New record 6. 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. 7. 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" - if you are told "650 - No matching authority found" then this patch does not work.
Also, the patch has included adding the file C4/Biblio.pm.rej for a couple of years now. Also, there are still unaddressed concerns from comment 24 from 5+ years ago.
Created attachment 151476 [details] [review] Bug 11300: Add a new authority linker which searches for authority links on a Z39.50 server. This patch adds a Z39.50 Linker which searches for authority links on a remote server. If a matching authority is found, it's imported in the local database for linking with the current biblio record. If no matching authority was found on the remote server, the Linker falls back to a local authority search. Configuration : * The option "Z39.50 Server" is added to the LinkerModule preference. You must choose this to use the new Linker. * The preference LinkerZ3950Server is required and specifies which server to use for linking. It must contain the "name" of the server, as defined in the z3950servers table. * You can set the "local_first" option in the LinkerOptions preference to force the Linker to search for authorities in the local database first. If no local authority match was found, the Linker falls back to a remote Z39.50 search. Sponsored-by: CCSR ( http://www.ccsr.qc.ca )
Created attachment 151477 [details] Bug 11300: (Fix) Editing the way authority links is searched on a Z39.50 server. 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
Sorry if my "super-simple test plan" was confusing. I didn't intend that to be a description of everything the feature should do, only a super-simple way to tell whether or not it does anything at all, because testers have been asking for that since 2018. I certainly didn't intend to imply that the only thing a linker needs to do is link subjects which have only subfield a. A real test plan would include all the authority types that automatic linking supports, and headings with multiple subfields, and headings that should not match (for example, LC has an authority record for 150 $aAbandoned children$vFiction, which should not match 650 $aAbandoned children$xFiction, and $aAlabama$xHistory$yCivil War, 1861-1865 should match but in a different order $aAlabama$yCivil War, 1861-1865$xHistory should not).
(In reply to Phil Ringnalda from comment #55) > children$xFiction, and $aAlabama$xHistory$yCivil War, 1861-1865 should match > but in a different order $aAlabama$yCivil War, 1861-1865$xHistory should > not). Are you saying subfield order should matter?
Correct: the order of subfields matters, which subfield letter it is matters, and whether or not there is a subfield matters ($aScience fiction should not match $aScience$vFiction).
The code will not care about the order. I would be doing that and I would hear about it asking why there are duplicates.
I wasn't asking for a weird enhancement I just thought of, I was describing the behavior of an authority linker. Order matters, Dogs -- Food and Food -- Dogs are not the same headings.
Created attachment 155602 [details] [review] Bug 11300: Add a new authority linker which searches for authority links on a Z39.50 server. This patch adds a Z39.50 Linker which searches for authority links on a remote server. If a matching authority is found, it's imported in the local database for linking with the current biblio record. If no matching authority was found on the remote server, the Linker falls back to a local authority search. Configuration : * The option "Z39.50 Server" is added to the LinkerModule preference. You must choose this to use the new Linker. * The preference LinkerZ3950Server is required and specifies which server to use for linking. It must contain the "name" of the server, as defined in the z3950servers table. * You can set the "local_first" option in the LinkerOptions preference to force the Linker to search for authorities in the local database first. If no local authority match was found, the Linker falls back to a remote Z39.50 search. Sponsored-by: CCSR ( http://www.ccsr.qc.ca )
Created attachment 155603 [details] [review] Bug 11300: (Fix) Fixing the authority linking
Does a publicly-available z39.50 server where this would actually work exist? It would have to only return results from the main heading, and only exact matches. No z39.50 authority servers I know of do either one of those things. I tried linking two headings, "Scripting languages (Computer science)" which was linked to "ActionScript (Computer program language)" (because Scripting languages (Computer science) is in a 550 on that record) and "Patterson, James" which was linked to "Patterson, James A., 1947-" because that happens to be the first of the 14 pages of results the Library of Congress name authority server returns.
I guess that means there isn't a server where it works?
Hi, if I try Authority server of National library Czech republic via Yaz client: find @attr 1=1016 "ph135534" I get just one result. Number "ph135534" is is a unique authority identifier that also appears in the corresponding field of the biblio record Attribute 1016 = any term find @attr 1=1003 "Kinney Jeff 1971-" show just one result: [AUT]Record type: USmarc 00869cz a2200241n 4500 001 xx0093180 003 CZ PrNK 005 20110512104424.0 008 090327|n|acnnnaabn n a|a 040 $a ULG001 $b cze $d ABA001 046 $f 1971 100 1 $a Kinney, Jeff, $d 1971- $7 xx0093180 667 $a Záznam neprošel revizí podle pravidel RDA. 670 $a Jeho: Deník malého poseroutky 670 $a LC (Names), cit. 12. 5. 2011 670 $a www(Wikipedia, the free encyclopedia) 678 0 $a Americký spisovatel a ilustrátor, autor knih pro děti. 856 42 $u http://en.wikipedia.org/wiki/Jeff_Kinney_(writer) $4 N 906 $a za20090327 $b xivze 906 $a op20110512 $b anmu $c zdroj - aktualizace, další výskyt, URL - nově, biografická poznámka -doplnění 996 $a xx $b 60 $c 20090327 $l AUT10 996 $a 0073 $b 60 $c 20110512 $l AUT10 998 $a 000505890 Same if I try to find find @attr 1=1003 "xx0093180". I think a linker can work, but it should have the appropriate settings. Ideally one where you can write exact queries to Yaz that are tailored to the 39.50 North that the linker will query.
I think a linker can work, but it should have the appropriate settings. Ideally one where you can write exact queries to Yaz that are tailored to the z39.50 server that the linker will query.
Created attachment 159741 [details] [review] Bug 11300: Add a new authority linker which searches for authority links on a Z39.50 server. This patch adds a Z39.50 Linker which searches for authority links on a remote server. If a matching authority is found, it's imported in the local database for linking with the current biblio record. If no matching authority was found on the remote server, the Linker falls back to a local authority search. Configuration : * The option "Z39.50 Server" is added to the LinkerModule preference. You must choose this to use the new Linker. * The preference LinkerZ3950Server is required and specifies which server to use for linking. It must contain the "name" of the server, as defined in the z3950servers table. * You can set the "local_first" option in the LinkerOptions preference to force the Linker to search for authorities in the local database first. If no local authority match was found, the Linker falls back to a remote Z39.50 search. Sponsored-by: CCSR ( http://www.ccsr.qc.ca )
Created attachment 159742 [details] [review] Bug 11300: (Fix) Fixing the authority linking
Rebased
Created attachment 163946 [details] [review] Bug 11300: Add a new authority linker which searches for authority links on a Z39.50 server. This patch adds a Z39.50 Linker which searches for authority links on a remote server. If a matching authority is found, it's imported in the local database for linking with the current biblio record. If no matching authority was found on the remote server, the Linker falls back to a local authority search. Configuration : * The option "Z39.50 Server" is added to the LinkerModule preference. You must choose this to use the new Linker. * The preference LinkerZ3950Server is required and specifies which server to use for linking. It must contain the "name" of the server, as defined in the z3950servers table. * You can set the "local_first" option in the LinkerOptions preference to force the Linker to search for authorities in the local database first. If no local authority match was found, the Linker falls back to a remote Z39.50 search. Sponsored-by: CCSR ( http://www.ccsr.qc.ca )
Created attachment 163947 [details] [review] 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
Hi, I am following the Test plan, but the missing authorities will not download from 39.50. What is worse, in the lines where the link to the authority is missing, when I click on the Create authority icon I get error 403: Programming error - No CSRF token passed for POST http://localhost:8081/intranet/authorities/authorities.pl (referer: http://localhost:8081/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=) I'm not sure if I was able to set up LinkerZ3950Server correctly. It would be more user friendly and reliable to choose from the available servers rather than just writing its name. Then I have one more question. If z39.50 provide separately personal and subject, we may run into the problem that this option is now not possible to set up. Yet for fields 100 or 700 we are just looking for personal authorities and in fields 6X for subjects.
Created attachment 171304 [details] [review] Bug 11300: Add a new authority linker which searches for authority links on a Z39.50 server. This patch adds a Z39.50 Linker which searches for authority links on a remote server. If a matching authority is found, it's imported in the local database for linking with the current biblio record. If no matching authority was found on the remote server, the Linker falls back to a local authority search. Configuration : * The option "Z39.50 Server" is added to the LinkerModule preference. You must choose this to use the new Linker. * The preference LinkerZ3950Server is required and specifies which server to use for linking. It must contain the "name" of the server, as defined in the z3950servers table. * You can set the "local_first" option in the LinkerOptions preference to force the Linker to search for authorities in the local database first. If no local authority match was found, the Linker falls back to a remote Z39.50 search. Sponsored-by: CCSR ( http://www.ccsr.qc.ca )
Created attachment 171689 [details] [review] Bug 11300: Add a new authority linker which searches for authority links on a Z39.50 server. This patch adds a Z39.50 Linker which searches for authority links on a remote server. If a matching authority is found, it's imported in the local database for linking with the current biblio record. If no matching authority was found on the remote server, the Linker falls back to a local authority search. Configuration : * The option "Z39.50 Server" is added to the LinkerModule preference. You must choose this to use the new Linker. * The preference LinkerZ3950Server is required and specifies which server to use for linking. It must contain the "name" of the server, as defined in the z3950servers table. * You can set the "local_first" option in the LinkerOptions preference to force the Linker to search for authorities in the local database first. If no local authority match was found, the Linker falls back to a remote Z39.50 search. Sponsored-by: CCSR ( http://www.ccsr.qc.ca )