Bugzilla – Attachment 20752 Details for
Bug 10811
Add a 999$c record matching rule to the MARC21 defaults
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10811 - Add a 999$c record matching rule to the MARC21 defaults
Bug-10811---Add-a-999c-record-matching-rule-to-the.patch (text/plain), 3.52 KB, created by
David Cook
on 2013-09-02 03:47:31 UTC
(
hide
)
Description:
Bug 10811 - Add a 999$c record matching rule to the MARC21 defaults
Filename:
MIME Type:
Creator:
David Cook
Created:
2013-09-02 03:47:31 UTC
Size:
3.52 KB
patch
obsolete
>From 9678d23f07c7c17d8e52098279e05d4d4d1aef14 Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Mon, 2 Sep 2013 13:25:03 +1000 >Subject: [PATCH] Bug 10811 - Add a 999$c record matching rule to the MARC21 > defaults > >This patch adds a default record matching rule for biblionumber >using the 999$c and the Local-Number index. > >This is part of the optional marc21 SQL, as well as in the >updatabase.pl script. > >TEST PLAN > >0) Apply the patch >1) Run updatedatabase.pl >2) Export some MARC bibliographic records from Koha >3) Import those same MARC bibliographic records using the >"KohaBiblio" record matching rule. >4) The incoming records should match perfectly >--- > .../optional/marc21_default_matching_rules.sql | 8 ++++++++ > installer/data/mysql/updatedatabase.pl | 18 ++++++++++++++++++ > 2 files changed, 26 insertions(+), 0 deletions(-) > >diff --git a/installer/data/mysql/en/marcflavour/marc21/optional/marc21_default_matching_rules.sql b/installer/data/mysql/en/marcflavour/marc21/optional/marc21_default_matching_rules.sql >index 4d39a5e..1160094 100644 >--- a/installer/data/mysql/en/marcflavour/marc21/optional/marc21_default_matching_rules.sql >+++ b/installer/data/mysql/en/marcflavour/marc21/optional/marc21_default_matching_rules.sql >@@ -36,3 +36,11 @@ INSERT INTO matchpoint_components (matchpoint_id, sequence, tag, subfields) > INSERT INTO matchpoint_component_norms (matchpoint_component_id, sequence, norm_routine) > SELECT MAX(matchpoint_component_id), 1, 'ISSN' FROM matchpoint_components; > >+INSERT INTO marc_matchers (code, description, record_type, threshold) >+ VALUES ('KohaBiblio', '999$c', 'biblio', 1000); >+INSERT INTO matchpoints (matcher_id, search_index, score) SELECT MAX(matcher_id), 'Local-Number', 1000 FROM marc_matchers; >+INSERT INTO matcher_matchpoints SELECT MAX(matcher_id), MAX(matchpoint_id) FROM matchpoints; >+INSERT INTO matchpoint_components (matchpoint_id, sequence, tag, subfields) >+ SELECT MAX(matchpoint_id), 1, '999', 'c' FROM matchpoints; >+INSERT INTO matchpoint_component_norms (matchpoint_component_id, sequence, norm_routine) >+ SELECT MAX(matchpoint_component_id), 1, 'Biblionumber' FROM matchpoint_components; >\ No newline at end of file >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 74aeb3e..2535a17 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -7067,6 +7067,24 @@ if ( CheckVersion($DBversion) ) { > SetVersion($DBversion); > } > >+$DBversion = "3.13.00.XXX"; >+if ( CheckVersion($DBversion) ) { >+ if ( C4::Context->preference("marcflavour") eq 'MARC21' ) { >+ $dbh->do(" >+ INSERT INTO marc_matchers (code, description, record_type, threshold) >+ VALUES ('KohaBiblio', '999$c', 'biblio', 1000); >+ INSERT INTO matchpoints (matcher_id, search_index, score) SELECT MAX(matcher_id), 'Local-Number', 1000 FROM marc_matchers; >+ INSERT INTO matcher_matchpoints SELECT MAX(matcher_id), MAX(matchpoint_id) FROM matchpoints; >+ INSERT INTO matchpoint_components (matchpoint_id, sequence, tag, subfields) >+ SELECT MAX(matchpoint_id), 1, '999', 'c' FROM matchpoints; >+ INSERT INTO matchpoint_component_norms (matchpoint_component_id, sequence, norm_routine) >+ SELECT MAX(matchpoint_component_id), 1, 'Biblionumber' FROM matchpoint_components; >+ "); >+ } >+ print "Upgrade to $DBversion done (Bug 10811: Add a 999$c record matching rule to the MARC21 defaults)\n"; >+ SetVersion($DBversion); >+} >+ > =head1 FUNCTIONS > > =head2 TableExists($table) >-- >1.7.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 10811
:
20752
|
21216
|
21587
|
23772
|
24421
|
24441
|
24528