Bug 25272 - Different behavior between live and deferred merges and between merged and retained record
Summary: Different behavior between live and deferred merges and between merged and re...
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: MARC Authority data support (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-24 06:12 UTC by Phil Ringnalda
Modified: 2020-04-26 04:16 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Phil Ringnalda 2020-04-24 06:12:15 UTC
A bit complicated, and requires badly mislinked data to be seen. To create the mislinks, you either have to edit the Default MARC Framework to allow editing of subfield 9, which is sort of a pain, or just enable the advanced editor with the system preference . You have to edit system preferences anyway, to lower AuthorityMergeLimit, so I recommend that method.

1. Change the system preference AuthorityMergeLimit to 1
2. Enable EnableAdvancedCatalogingEditor
3. Authorities - New - Personal Name
4. Five required fields on the first tab, with red labels, just click in each to fill in automatic data
5. On the second tab, click the HEADING--PERSONAL NAME label to open the subfields, and in subfield a type the letter A and click Save (there will probably be a duplicate warning, just click No, Save as new)
6. Click the Edit menubutton, and choose Edit as new (duplicate)
7. On the "1" tab, change the A to B and save
8. Edit menubutton, Edit as new (duplicate), change the B to C and save
9. At this point, you know the authority id number for C, because it's shown there on the page as "Authority #1710". That tells you that B is one less, and A is two less. You need to know those three numbers.
10. Go to Circulation, Search the catalog, search for anything that will return at least five records with authors. Perl works nicely.
11. On the first, click Edit record, which will open the basic editor. Click settings, Switch to advanced editor, and click through the warning.
12. Find the 100 tag for the author, and its subfield 9, which will look like ‡917
13. Leaving the 9, replace the number with the number for your first authority record, the author A
14. Do the same thing for two more records, using the number for your second author, B
15. Do the same thing for two more records, using the number for your third author, C
16. Back to Authorities, search for Personal name / starts with / A, and verify that you have 1 matching record. Open the link for that record in a new tab.
17. From that tab, open Authorities in a new tab, search for Personal name / starts with / B, verify it has 2 records, open the link for them in a new tab.
18. Authorities in a new tab, name starts C, verify there are 2, open the records in a new tab.
19. Back to the authorities tab for A, Actions button, merge
20. Over to the authorities tab for B, Actions button, merge
21. You do want to keep B, so click Next, then Merge
22. In the tab with the two records for B (which is a search for B's authority id) reload the page, you should now see three records, the one that was linked to A now having B as the author because it was merged immediately, and the other two still having their original authors because 2 was over the merge limit
23. Run misc/cronjobs/merge_authorities.pl -b
24. Reload the tab with the search for B's authority id, all three records should now have the author B.
25. Merge B to C
26. Both were over the limit, so nothing has changed
27. Run misc/cronjobs/merge_authorities.pl -b
28. Reload the tab with C's records, there should now be 5, all with the author C

Alas, you haven't yet seen the bug, only that it doesn't occur when the mislinked bib records are linked to the proper sort of authority for the bib field. Now you have to go through all those steps again, but instead of creating personal name authorities, create corporate name authorities. Still put the authority numbers into the 100 fields of the bib records. When you merge A to B,  the bib record for A will be unchanged, still having the original author, still having the mislinked number in subfield 9 which goes to the wrong authority. When you run the cronjob to do the deferred B to B merge, again nothing will change. But when you merge B to C, so that both halves of the merge are deferred, while the C to C merge will not change anything on those two records, the B to C merge will remove a 100 field and replace it with a 110 field for the corporate author C. Only in merges through the cronjob, and only for the ones that were mislinked to the authority record that's going away, it ignores the tag number and just replaces whatever field has the authority id in subfield 9.
Comment 1 Marcel de Rooy 2020-04-24 06:31:47 UTC
Great description, Phil.
Comment 2 Victor Grousset/tuxayo 2020-04-26 04:16:11 UTC
See bug 22437 comment 17 for more context if need. (or existing example in current sample date of koha_testing_docker)

and also
- bug 22437 comment 18
- bug 22437 comment 25