Bugzilla – Attachment 40801 Details for
Bug 14472
Wrong ISSN search index in record matching rules
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14472 - Squashed Wrong ISSN search index in matching rules
0001-Bug-14472-Squashed-Wrong-ISSN-search-index-in-matchi.patch (text/plain), 12.13 KB, created by
Amit Gupta
on 2015-07-06 03:38:37 UTC
(
hide
)
Description:
Bug 14472 - Squashed Wrong ISSN search index in matching rules
Filename:
MIME Type:
Creator:
Amit Gupta
Created:
2015-07-06 03:38:37 UTC
Size:
12.13 KB
patch
obsolete
>From adf39b121b8cf77872bf5ed6b7e7c7d73c1bad72 Mon Sep 17 00:00:00 2001 >From: Amit Gupta <amit.gupta@informaticsglobal.com> >Date: Mon, 29 Jun 2015 21:41:01 +0530 >Subject: [PATCH] Bug 14472 - Squashed Wrong ISSN search index in matching > rules > >Bug 14472 - Added Atomic Update to fix wrong issn search index > >Bug 14472 - Wrong ISSN search index in record matching rules > >To Test >--------- > 1) Apply the patch > 2) Export some MARC bibliographic records from Koha > 3) Import those same MARC bibliographic records using the > "ISSN(022$a)" record matching rule. > 4) The incoming records should match perfectly > 5) Check the mysql tables (marc_matchers, matchpoints, > matcher_matchpoints, matchpoint_components, > matchpoint_component_norms) to make sure the values were > inserted as expected. >For new Koha installation > 1) create the koha database > 2) Go to the staff client page, and do a "fresh" install making > sure to select lots of optional marc 21 matching rules so > the .../marc21/optional/marc21_default_matching_rules.sql > gets triggered. > 3) Check the mysql tables (marc_matchers, matchpoints, > matcher_matchpoints, matchpoint_components, > matchpoint_component_norms) to make sure the values were > inserted as expected. >--- > ..._ISSN_search_index_in_record_matching_rules.sql | 1 + > .../optional/marc21_default_matching_rules.sql | 2 +- > .../optional/marc21_default_matching_rules.sql | 2 +- > .../optional/marc21_default_matching_rules.sql | 2 +- > .../Optionnel/marc21_default_matching_rules.sql | 2 +- > .../optional/marc21_default_matching_rules.sql | 2 +- > .../optional/marc21_default_matching_rules.sql | 2 +- > .../optional/marc21_default_matching_rules.sql | 2 +- > .../optional/marc21_default_matching_rules.sql | 2 +- > .../optional/marc21_default_matching_rules.sql | 2 +- > 10 files changed, 10 insertions(+), 9 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_14472_Wrong_ISSN_search_index_in_record_matching_rules.sql > >diff --git a/installer/data/mysql/atomicupdate/bug_14472_Wrong_ISSN_search_index_in_record_matching_rules.sql b/installer/data/mysql/atomicupdate/bug_14472_Wrong_ISSN_search_index_in_record_matching_rules.sql >new file mode 100644 >index 0000000..69878e6 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_14472_Wrong_ISSN_search_index_in_record_matching_rules.sql >@@ -0,0 +1 @@ >+UPDATE matchpoints SET search_index = 'issn' WHERE matcher_id = 2; >diff --git a/installer/data/mysql/de-DE/marcflavour/marc21/optional/marc21_default_matching_rules.sql b/installer/data/mysql/de-DE/marcflavour/marc21/optional/marc21_default_matching_rules.sql >index 4d39a5e..b863911 100644 >--- a/installer/data/mysql/de-DE/marcflavour/marc21/optional/marc21_default_matching_rules.sql >+++ b/installer/data/mysql/de-DE/marcflavour/marc21/optional/marc21_default_matching_rules.sql >@@ -29,7 +29,7 @@ INSERT INTO matchpoint_component_norms (matchpoint_component_id, sequence, norm_ > > INSERT INTO marc_matchers (code, description, record_type, threshold) > VALUES ('ISSN', '022$a', 'biblio', 1000); >-INSERT INTO matchpoints (matcher_id, search_index, score) SELECT MAX(matcher_id), 'isbn', 1000 FROM marc_matchers; >+INSERT INTO matchpoints (matcher_id, search_index, score) SELECT MAX(matcher_id), 'issn', 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, '022', 'a' FROM matchpoints; >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 801f04a..2e538a4 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 >@@ -29,7 +29,7 @@ INSERT INTO matchpoint_component_norms (matchpoint_component_id, sequence, norm_ > > INSERT INTO marc_matchers (code, description, record_type, threshold) > VALUES ('ISSN', '022$a', 'biblio', 1000); >-INSERT INTO matchpoints (matcher_id, search_index, score) SELECT MAX(matcher_id), 'isbn', 1000 FROM marc_matchers; >+INSERT INTO matchpoints (matcher_id, search_index, score) SELECT MAX(matcher_id), 'issn', 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, '022', 'a' FROM matchpoints; >diff --git a/installer/data/mysql/es-ES/marcflavour/marc21/optional/marc21_default_matching_rules.sql b/installer/data/mysql/es-ES/marcflavour/marc21/optional/marc21_default_matching_rules.sql >index 4d39a5e..b863911 100644 >--- a/installer/data/mysql/es-ES/marcflavour/marc21/optional/marc21_default_matching_rules.sql >+++ b/installer/data/mysql/es-ES/marcflavour/marc21/optional/marc21_default_matching_rules.sql >@@ -29,7 +29,7 @@ INSERT INTO matchpoint_component_norms (matchpoint_component_id, sequence, norm_ > > INSERT INTO marc_matchers (code, description, record_type, threshold) > VALUES ('ISSN', '022$a', 'biblio', 1000); >-INSERT INTO matchpoints (matcher_id, search_index, score) SELECT MAX(matcher_id), 'isbn', 1000 FROM marc_matchers; >+INSERT INTO matchpoints (matcher_id, search_index, score) SELECT MAX(matcher_id), 'issn', 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, '022', 'a' FROM matchpoints; >diff --git a/installer/data/mysql/fr-FR/marcflavour/marc21/Optionnel/marc21_default_matching_rules.sql b/installer/data/mysql/fr-FR/marcflavour/marc21/Optionnel/marc21_default_matching_rules.sql >index 4d39a5e..b863911 100644 >--- a/installer/data/mysql/fr-FR/marcflavour/marc21/Optionnel/marc21_default_matching_rules.sql >+++ b/installer/data/mysql/fr-FR/marcflavour/marc21/Optionnel/marc21_default_matching_rules.sql >@@ -29,7 +29,7 @@ INSERT INTO matchpoint_component_norms (matchpoint_component_id, sequence, norm_ > > INSERT INTO marc_matchers (code, description, record_type, threshold) > VALUES ('ISSN', '022$a', 'biblio', 1000); >-INSERT INTO matchpoints (matcher_id, search_index, score) SELECT MAX(matcher_id), 'isbn', 1000 FROM marc_matchers; >+INSERT INTO matchpoints (matcher_id, search_index, score) SELECT MAX(matcher_id), 'issn', 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, '022', 'a' FROM matchpoints; >diff --git a/installer/data/mysql/it-IT/marcflavour/marc21/optional/marc21_default_matching_rules.sql b/installer/data/mysql/it-IT/marcflavour/marc21/optional/marc21_default_matching_rules.sql >index 4d39a5e..b863911 100644 >--- a/installer/data/mysql/it-IT/marcflavour/marc21/optional/marc21_default_matching_rules.sql >+++ b/installer/data/mysql/it-IT/marcflavour/marc21/optional/marc21_default_matching_rules.sql >@@ -29,7 +29,7 @@ INSERT INTO matchpoint_component_norms (matchpoint_component_id, sequence, norm_ > > INSERT INTO marc_matchers (code, description, record_type, threshold) > VALUES ('ISSN', '022$a', 'biblio', 1000); >-INSERT INTO matchpoints (matcher_id, search_index, score) SELECT MAX(matcher_id), 'isbn', 1000 FROM marc_matchers; >+INSERT INTO matchpoints (matcher_id, search_index, score) SELECT MAX(matcher_id), 'issn', 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, '022', 'a' FROM matchpoints; >diff --git a/installer/data/mysql/nb-NO/marcflavour/marc21/optional/marc21_default_matching_rules.sql b/installer/data/mysql/nb-NO/marcflavour/marc21/optional/marc21_default_matching_rules.sql >index 4d39a5e..b863911 100644 >--- a/installer/data/mysql/nb-NO/marcflavour/marc21/optional/marc21_default_matching_rules.sql >+++ b/installer/data/mysql/nb-NO/marcflavour/marc21/optional/marc21_default_matching_rules.sql >@@ -29,7 +29,7 @@ INSERT INTO matchpoint_component_norms (matchpoint_component_id, sequence, norm_ > > INSERT INTO marc_matchers (code, description, record_type, threshold) > VALUES ('ISSN', '022$a', 'biblio', 1000); >-INSERT INTO matchpoints (matcher_id, search_index, score) SELECT MAX(matcher_id), 'isbn', 1000 FROM marc_matchers; >+INSERT INTO matchpoints (matcher_id, search_index, score) SELECT MAX(matcher_id), 'issn', 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, '022', 'a' FROM matchpoints; >diff --git a/installer/data/mysql/pl-PL/marcflavour/marc21/optional/marc21_default_matching_rules.sql b/installer/data/mysql/pl-PL/marcflavour/marc21/optional/marc21_default_matching_rules.sql >index 266a300..083efdf 100644 >--- a/installer/data/mysql/pl-PL/marcflavour/marc21/optional/marc21_default_matching_rules.sql >+++ b/installer/data/mysql/pl-PL/marcflavour/marc21/optional/marc21_default_matching_rules.sql >@@ -29,7 +29,7 @@ INSERT INTO matchpoint_component_norms (matchpoint_component_id, sequence, norm_ > > INSERT INTO marc_matchers (code, description, record_type, threshold) > VALUES ('ISSN', '022$a', 'biblio', 1000); >-INSERT INTO matchpoints (matcher_id, search_index, score) SELECT MAX(matcher_id), 'isbn', 1000 FROM marc_matchers; >+INSERT INTO matchpoints (matcher_id, search_index, score) SELECT MAX(matcher_id), 'issn', 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, '022', 'a' FROM matchpoints; >diff --git a/installer/data/mysql/ru-RU/marcflavour/marc21/optional/marc21_default_matching_rules.sql b/installer/data/mysql/ru-RU/marcflavour/marc21/optional/marc21_default_matching_rules.sql >index 4f41421..5415075 100644 >--- a/installer/data/mysql/ru-RU/marcflavour/marc21/optional/marc21_default_matching_rules.sql >+++ b/installer/data/mysql/ru-RU/marcflavour/marc21/optional/marc21_default_matching_rules.sql >@@ -29,7 +29,7 @@ INSERT INTO matchpoint_component_norms (matchpoint_component_id, sequence, norm_ > > INSERT INTO marc_matchers (code, description, record_type, threshold) > VALUES ('ISSN', '022$a', 'biblio', 1000); >-INSERT INTO matchpoints (matcher_id, search_index, score) SELECT MAX(matcher_id), 'isbn', 1000 FROM marc_matchers; >+INSERT INTO matchpoints (matcher_id, search_index, score) SELECT MAX(matcher_id), 'issn', 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, '022', 'a' FROM matchpoints; >diff --git a/installer/data/mysql/uk-UA/marcflavour/marc21/optional/marc21_default_matching_rules.sql b/installer/data/mysql/uk-UA/marcflavour/marc21/optional/marc21_default_matching_rules.sql >index 4f41421..5415075 100644 >--- a/installer/data/mysql/uk-UA/marcflavour/marc21/optional/marc21_default_matching_rules.sql >+++ b/installer/data/mysql/uk-UA/marcflavour/marc21/optional/marc21_default_matching_rules.sql >@@ -29,7 +29,7 @@ INSERT INTO matchpoint_component_norms (matchpoint_component_id, sequence, norm_ > > INSERT INTO marc_matchers (code, description, record_type, threshold) > VALUES ('ISSN', '022$a', 'biblio', 1000); >-INSERT INTO matchpoints (matcher_id, search_index, score) SELECT MAX(matcher_id), 'isbn', 1000 FROM marc_matchers; >+INSERT INTO matchpoints (matcher_id, search_index, score) SELECT MAX(matcher_id), 'issn', 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, '022', 'a' FROM matchpoints; >-- >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 14472
:
40721
|
40722
|
40724
|
40725
|
40801
|
40840
|
42256
|
42275
|
42276
|
42710