Bugzilla – Attachment 21612 Details for
Bug 10096
Add a Z39.50 interface for authority searching
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10096 - [FOLLOW-UP] QA Improvements
Bug-10096---FOLLOW-UP-QA-Improvements.patch (text/plain), 8.36 KB, created by
Katrin Fischer
on 2013-09-29 20:55:56 UTC
(
hide
)
Description:
Bug 10096 - [FOLLOW-UP] QA Improvements
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2013-09-29 20:55:56 UTC
Size:
8.36 KB
patch
obsolete
>From 1c50f2f31c14d0046b006d0a7fa28953f6804e7d Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Tue, 10 Sep 2013 12:41:36 +1000 >Subject: [PATCH] Bug 10096 - [FOLLOW-UP] QA Improvements > >0) Run updatedatabase.pl (to add "recordtype" to the z3950servers table. > >1) Set up Z39.50 client targets for authority databases. (I've included >information at the bottom of this message for LibrariesAustralia's >test server for authorities as well as instructions on how to use >your Koha's z39.50 authority server as well. The Library of Congress >also has authority databases available (unsure if these are test or >prod), and you might have access to others through OCLC or RLIN. OCLC >provides login credentials for their test databases. > >N.B. Make sure that your Z39.50 client target has a Record Type >of Authority, otherwise it won't display when you're doing a >Z3950 search for authorities. > >2) Go to the Authorities module > >3) Click on the new "Z39.50 search button" > >4) Select your authority search targets from the list > >5) Do a search for an authority you would like using either the "Keyword" >input box or the more specific input boxes for names, subjects, subject >sub divisions, or titles. (I like searching Author (personal): Eric on >the LibrariesAustralia test DB.) > >6) You should see a table listing the server, heading, authority type, >and two other columns (MARC and a nameless column). "Authority type" >is the type of authority it will become when imported in to Koha. In >the Eric example, "PERSO_NAME". > >7) Click on "MARC" next to the results of interest to review the MARC >authority record. > >8) When you're satisfied with a record, click on "Import". > >9) The pop-up window will close and your original Koha window will >change to the "Adding authority Personal Name" screen (in the Eric >example). > >10) All the relevant fields should be filled out for the record. Review >them and make any changes as necessary. (N.B. The 001 will be cleared >when saved, so if you have a use for the imported control number, move >it to the 010, 016, or 035 as appropriate. If you have a default value >for the 003, this will also likely be overwritten. Move it if necessary. >The 005 will also be updated when saved, so do not worry about that.) > >11) When you're satisfied, click save. > >12) Presto! You've imported your first authority record via Z39.50! >--- > C4/Breeding.pm | 13 ++----------- > admin/z3950servers.pl | 6 +++--- > cataloguing/z3950_auth_search.pl | 15 +++++---------- > installer/data/mysql/updatedatabase.pl | 2 +- > 4 files changed, 11 insertions(+), 25 deletions(-) > >diff --git a/C4/Breeding.pm b/C4/Breeding.pm >index 876ea19..8e01d41 100644 >--- a/C4/Breeding.pm >+++ b/C4/Breeding.pm >@@ -457,7 +457,8 @@ sub _isbn_replace { > > ImportBreedingAuth($marcrecords,$overwrite_auth,$filename,$encoding,$z3950random,$batch_type); > >-TODO description >+ ImportBreedingAuth imports MARC records in the reservoir (import_records table). >+ ImportBreedingAuth is based on the ImportBreeding subroutine. > > =cut > >@@ -485,10 +486,6 @@ sub ImportBreedingAuth { > # Normalize the record so it doesn't have separated diacritics > SetUTF8Flag($marcrecord); > >-# warn "$i : $marcarray[$i]"; >- # FIXME - currently this does nothing >- my @warnings = $marcrecord->warnings(); >- > if (scalar($marcrecord->fields()) == 0) { > $notmarcrecord++; > } else { >@@ -509,10 +506,6 @@ sub ImportBreedingAuth { > > if ($duplicateauthid && $overwrite_auth ne 2) { > #If the authority record exists and $overwrite_auth doesn't equal 2, then mark it as already in the DB >- #FIXME: What does $overwrite_auth = 2 even mean? >- >- #FIXME: Should we bother with $overwrite_auth values? Currently, the hard-coded $overwrite_auth value is 2, which means the database gets filled with import_records... >- #^^ of course, we might not want to reject records if their control number/heading exist in the db or breeding/import pool...as we might be wanting to update existing authority records... > $alreadyindb++; > } else { > if ($controlnumber && $heading) { >@@ -520,11 +513,9 @@ sub ImportBreedingAuth { > ($breedingid) = $searchbreeding->fetchrow; > } > if ($breedingid && $overwrite_auth eq '0') { >- #FIXME: What does $overwrite_auth = 0 even mean? > $alreadyinfarm++; > } else { > if ($breedingid && $overwrite_auth eq '1') { >- #FIXME: What does $overwrite_auth = 1 even mean? > ModAuthorityInBatch($breedingid, $marcrecord); > } else { > my $import_id = AddAuthToBatch($batch_id, $imported, $marcrecord, $encoding, $z3950random); >diff --git a/admin/z3950servers.pl b/admin/z3950servers.pl >index 51de4ca..0905a5d 100755 >--- a/admin/z3950servers.pl >+++ b/admin/z3950servers.pl >@@ -113,7 +113,7 @@ if ( $op eq 'add_form' ) { > my $checked = $input->param('checked') ? 1 : 0; > if ($sth->rows) { > $template->param(confirm_update => 1); >- $sth=$dbh->prepare("update z3950servers set host=?, port=?, db=?, userid=?, password=?, name=?, checked=?, rank=?,syntax=?,encoding=?,timeout=?,recordtype=? where name=?"); >+ $sth=$dbh->prepare("update z3950servers set host=?, port=?, db=?, userid=?, password=?, name=?, checked=?, rank=?,syntax=?,encoding=?,timeout=?,recordtype=? where name=?"); > $sth->execute($input->param('host'), > $input->param('port'), > $input->param('db'), >@@ -133,8 +133,8 @@ if ( $op eq 'add_form' ) { > $template->param(confirm_add => 1); > $sth=$dbh->prepare( > "INSERT INTO z3950servers " . >- "(host,port,db,userid,password,name,checked,rank,syntax,encoding,timeout,recordtype) " . >- "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" ); >+ "(host,port,db,userid,password,name,checked,rank,syntax,encoding,timeout,recordtype) " . >+ "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" ); > $sth->execute( > $input->param('host'), $input->param('port'), > $input->param('db'), $input->param('userid'), >diff --git a/cataloguing/z3950_auth_search.pl b/cataloguing/z3950_auth_search.pl >index 47be33e..3ab7666 100755 >--- a/cataloguing/z3950_auth_search.pl >+++ b/cataloguing/z3950_auth_search.pl >@@ -1,25 +1,20 @@ > #!/usr/bin/perl > >-# This is a completely new Z3950 clients search using async ZOOM -TG 02/11/06 >-# Copyright 2000-2002 Katipo Communications >-# >-# This is a new Z3950 authority search using the current Z3950 bibliographic search as a model 07/05/2013 >-# Parts Copyright 2013 Prosentient Systems >-# > # This file is part of Koha. > # >+# Copyright 2013 Prosentient Systems >+# > # Koha is free software; you can redistribute it and/or modify it under the > # terms of the GNU General Public License as published by the Free Software >-# Foundation; either version 2 of the License, or (at your option) any later >+# Foundation; either version 3 of the License, or (at your option) any later > # version. > # > # Koha is distributed in the hope that it will be useful, but WITHOUT ANY > # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR >-# A PARTICULAR PURPOSE. See the GNU General Public License for more details. >+# A PARTICULAR PURPOSE. See the GNU General Public License for more details. > # > # You should have received a copy of the GNU General Public License along >-# with Koha; if not, write to the Free Software Foundation, Inc., >-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. >+# with Koha; if not, see <http://www.gnu.org/licenses>. > > use strict; > use warnings; >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index bfaf2e9..a078baf 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -7159,7 +7159,7 @@ if ( CheckVersion($DBversion) ) { > > $DBversion = "3.13.00.XXX"; > if ( CheckVersion($DBversion) ) { >- $dbh->do(q{ALTER TABLE `z3950servers` ADD COLUMN `recordtype` VARCHAR(45) NOT NULL DEFAULT 'biblio';}); >+ $dbh->do(q{ALTER TABLE z3950servers ADD COLUMN recordtype VARCHAR(45) NOT NULL DEFAULT 'biblio' AFTER description;}); > print "Upgrade to $DBversion done (Bug 10096 - Add a Z39.50 interface for authority searching)\n"; > SetVersion ($DBversion); > } >-- >1.7.9.5
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 10096
:
18001
|
18011
|
18108
|
18648
|
18789
|
18790
|
18791
|
19957
|
19958
|
19959
|
19960
|
20927
|
20928
|
20929
|
21611
|
21612
|
21762
|
21763