Created attachment 40721 [details] Wrong search index Wrong ISSN search index in record matching rules. Currently ISSN record matching rules using "isbn" search index. Result: 1) Not able to upload records via 022$a (ISSN) matching rule.
Created attachment 40722 [details] Wrong search index
Created attachment 40724 [details] [review] Bug 14472 - Wrong ISSN search index in record matching rules
Created attachment 40725 [details] [review] Bug 14472 - Wrong ISSN search index in record matching rules TEST PLAN --------- 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.
Comment on attachment 40724 [details] [review] Bug 14472 - Wrong ISSN search index in record matching rules Review of attachment 40724 [details] [review]: ----------------------------------------------------------------- Hi Amit, You may want to squash these two commits into one. Makes little sense to have a separate one-line commit. -idg
Created attachment 40801 [details] [review] Bug 14472 - Squashed Wrong ISSN search index in matching rules Thanks IDG for comments I squashed two patches for simplicity. Bug 14472 - Wrong ISSN search index in record matching rules TEST PLAN --------- 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.
> UPDATE matchpoints SET search_index = 'issn' WHERE matcher_id = 2; How do you know the matcher_id is 2 for everyone? Your fresh install modifications change isbn to issn, is that correct?
Hi Mark, Thanks for comments >How do you know the matcher_id is 2 for everyone? Yes you are right matcher_id is 2 not for everyone. ------------------------------------------------------- update marc_matchers set search_index ='issn' where matcher_id = (select matcher_id from marc_matchers where code = 'ISSN'); ------------------------------------------------------- >Your fresh install modifications change isbn to issn, is that correct? Currently if you upload MARC records using "ISSN(022$a)" record matching rule. It will not match any record due to wrong search index. After applying this patch the incoming records should match perfectly using ("ISSN(022$a)" record matching rule). Will resend patch again.
correct sql -------------------- UPDATE matchpoints SET search_index ='issn' where matcher_id = (SELECT matcher_id FROM marc_matchers WHERE code = 'ISSN');
Created attachment 40840 [details] [review] Bug 14472 - Wrong ISSN search index in record matching rules Bug 14472 - Wrong ISSN search index in record matching rules TEST PLAN --------- 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. Fix SQL: UPDATE matchpoints SET search_index ='issn' where matcher_id = (SELECT matcher_id FROM marc_matchers WHERE code = 'ISSN');
Created attachment 42256 [details] [review] 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. Bug 14472 - Added Atomic Update to fix wrong issn search index - Fix comments Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Created attachment 42275 [details] [review] 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. Bug 14472 - Added Atomic Update to fix wrong issn search index - Fix comments Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 42276 [details] [review] Bug 14472: (follow-up) Wrong ISSN search index in record matching rules Follow-up for - it-IT unimarc - ru-RU unimarc - uk-UA unimarc Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Note that this file does not exist for fr-FR unimarc.
Patches pushed to master. Thanks Amit!
Created attachment 42710 [details] [review] Bug 14472: (QA followup) fix updatedatabase.pl for multiple ISSN rules If (for some reason) the user has created more than one matching rule with the 'ISSN' code, the updatedabase.pl script fails, because it was written with the default data in mind, and didn't consider the scenario described above. Thanks Liz for pointing this out! Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>