Bug 16954

Summary: Add the diff view to authorities in staged MARC records
Product: Koha Reporter: Héctor Eduardo Castro Avalos <hector.hecaxmmx>
Component: ToolsAssignee: Héctor Eduardo Castro Avalos <hector.hecaxmmx>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: hagud, katrin.fischer, marjorie.barry-vila
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: MARC for personal names
MARC for subjects term
Bug 16954: Add the diff view to authorities in staged MARC records
Bug 16954: Add the "record matching rules" for all languages

Description Héctor Eduardo Castro Avalos 2016-07-21 15:55:44 UTC
Since authorities can be imported thru staged MARC tool and a diff view has been added to the tool for bib records, it is necessary to do the diff view for authorities records.

If you make a "Record matching rule" for authorities you can match one existing auth record with the batch imported. The problem is that when a match is found and you click in "View diff" the tool shows you a bib record compared with the authority record imported.
Comment 1 Héctor Eduardo Castro Avalos 2016-07-21 19:40:24 UTC
Created attachment 53610 [details]
MARC for personal names
Comment 2 Héctor Eduardo Castro Avalos 2016-07-21 19:40:58 UTC
Created attachment 53611 [details]
MARC for subjects term
Comment 3 Héctor Eduardo Castro Avalos 2016-07-21 19:55:06 UTC
Created attachment 53613 [details] [review]
Bug 16954: Add the diff view to authorities in staged MARC records

To test:
-Update database: $ perl installer/data/mysql/updatedatabase.pl
-Go to Authorities and click in New from Z39.50
-Copy the authors: (Maxwell Robert, L. | Tanenbaum, Andrew S.) from Library of Congress
-Copy the subjects: Water-supply, Watering troughs from Library of Congress
-Reindex zebra
-Download the file personal_test_auth.mrc above in attachments
-Go to Tools -> Stage MARC records for import and upload the file personal_test_auth.mrc
 this file provide the same authors copied before with extra data.
-When upload progress is 100% chose:
 "Record type -> Authorities"
 "Record matching rule -> 100$a (Personal name)"
-Click in "Stage for import"
-In match details colum will match the two records, click in View and you'll see
 the original record and the diff with the imported.
-Download the file subjects_test_auth.mrc above in attachments and stage the records
-When upload progress is 100% chose:
 "Record type -> Authorities"
 "Record matching rule -> 150$a (Topical term)"
-In match details colum will match the two records, click in View and you'll see
 the original record and the diff with the imported.

Extra test:
-Test with existing bib records. Verify that your records have ISBN 10
 Koha convert ISBN 13 to 10 and sometimes fails.
 "Record type -> Bibliographic"
 "Record matching rule -> ISBN (020$a)"
-See that diff view works as before

Sponsored-by: Universidad de El Salvador
Comment 4 Héctor Eduardo Castro Avalos 2016-07-21 20:50:40 UTC
Created attachment 53617 [details] [review]
Bug 16954: Add the "record matching rules" for all languages

This patch add the matching rules for all languages so diff tool
works properly in all languages for new installations

To test:
Execute the sql:
SET FOREIGN_KEY_CHECKS=0;
truncate marc_matchers; truncate matchpoints; truncate matcher_matchpoints;
truncate matchpoint_components; truncate matchpoint_component_norms;
SET FOREIGN_KEY_CHECKS=1;

mysql -ukohauser -ppassword koha < kohaclone/installer/data/mysql/es-ES/marcflavour/marc21/optional/marc21_default_matching_rules.sql

Go to Tool -> Record matching rules. You will see the new data in Spanish

Sponsored-by: Universidad de El Salvador
Comment 5 Joy Nelson 2018-06-20 15:54:29 UTC
*** Bug 20130 has been marked as a duplicate of this bug. ***
Comment 6 Katrin Fischer 2018-10-16 17:40:11 UTC
We just got some patches on the duplicate bug 21579 that are signed off. Marking this as duplicate.

*** This bug has been marked as a duplicate of bug 21579 ***