Summary: | Merging different authority types creates no warning | ||
---|---|---|---|
Product: | Koha | Reporter: | Hugo Agud <hagud> |
Component: | Cataloging | Assignee: | Fridolin Somers <fridolin.somers> |
Status: | Pushed to oldoldstable --- | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | david, esther.melander, flyingendpaper, fridolin.somers, lucas, m.de.rooy, marion.durand, maude.boudreau, mengu, phil, robin, thibault.keromnes, wainuiwitikapark |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22666 | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This improves merging authorities of different types so that:
1. When selecting the reference record, the authority record number and type are displayed next to each record.
2. When merging authority records of different types:
. the authority type is now displayed in the tab heading, and
. a warning is also displayed "Multiple authority types are used. There may be a data loss while merging.".
Previously, no warning was given when merging authority records with different types - this could result in undesirable outcomes, data loss, and extra work required to clean up.
|
Version(s) released in: |
24.11.00,24.05.02,23.11.07,23.05.15
|
Circulation function: | |||
Attachments: |
Bug 25387: Merging different authority types create no warning
Bug 25387: Merging different authority types create no warning Bug 25387: Merging different authority types create no warning Bug 25387: Warn when merging different authority types Bug 25387: Warn when merging different authority types Bug 25387: Warn when merging different authority types Bug 25387: (QA follow-up) Tidy |
Description
Hugo Agud
2020-05-06 10:40:08 UTC
(In reply to Hugo Agud from comment #0) > When a librarian tries to merge two differents authorities for > exampletopic_authority with geogrpahic_authority (Turkey) it deletes one of > the authority and all the tags associated > > for example merging Turkey(topic) with Turkey(geographic) the result is all > 650$aTurkey dissapear > > We should add a lock to avoid merge two different authorities... Or should we warn? We have sometimes corporates that should be persons, or v.v. (In reply to Marcel de Rooy from comment #1) > > Or should we warn? > We have sometimes corporates that should be persons, or v.v. Good point, we have the same question from librarians. And also more display of auth type during merge. Created attachment 126415 [details] [review] Bug 25387: Merging different authority types create no warning Merging two different authorities types can result in the loss of some field. This patch adds a warning when merging different type of authorities and add more display of authorities types during merge. To test: 1- Find two authorities you what to merge. Be sure that these authorities have different type 2- Search for these authorities (be sure to have both results on the results page) 3- For the first authority click on "Actions" then on "Merge", same for the second one 4- Check that koha is asking you to choose a framework and that authority types are not displayed 5- Choose a framework, then click on next 6- Check that the authority type is not displayed in the tabs and that no warning appear 7- Apply the patch 8- Repeat step 1 to 3 again 9- Check that authority type is now displayed next to their ID 10- Repeate setp 5 again 11- Check that the authority types is now displayed in the tabs next to their ID and that a warning appear Hi, misc/translator/po/fr-FR-staff-prog-MT29830.po You must not integrate this file in Bugzilla, it is a Biblibre-specific system. I think we should not block. We should warn. We should allow catalogers in some way to e.g. move a corporate name into a personal name. Created attachment 126588 [details] [review] Bug 25387: Merging different authority types create no warning Merging two different authorities types can result in the loss of some field. This patch adds a warning when merging different type of authorities and add more display of authorities types during merge. To test: 1- Find two authorities you what to merge. Be sure that these authorities have different type 2- Search for these authorities (be sure to have both results on the results page) 3- For the first authority click on "Actions" then on "Merge", same for the second one 4- Check that koha is asking you to choose a framework and that authority types are not displayed 5- Choose a framework, then click on next 6- Check that the authority type is not displayed in the tabs and that no warning appear 7- Apply the patch 8- Repeat step 1 to 3 again 9- Check that authority type is now displayed next to their ID 10- Repeate setp 5 again 11- Check that the authority types is now displayed in the tabs next to their ID and that a warning appear (In reply to Fridolin Somers from comment #4) > Hi, > > misc/translator/po/fr-FR-staff-prog-MT29830.po > You must not integrate this file in Bugzilla, it is a Biblibre-specific > system. Oups ! I have removed it (In reply to Marcel de Rooy from comment #5) > I think we should not block. We should warn. > We should allow catalogers in some way to e.g. move a corporate name into a > personal name. Currently the patch display the authority types and warn the cataloger but it is still possible to merge authority with different authority type. Here is the message : "Multiple authority types are used. There may be a data loss while merging." (If you have an idea of a more appropriate want feel free to propose) Could it be an option to only allow merging when the 'losing' record is unused? In this case there would be no data loss and a warning would not be necessary. (In reply to Katrin Fischer from comment #9) > Could it be an option to only allow merging when the 'losing' record is > unused? In this case there would be no data loss and a warning would not be > necessary. I dont think so. Manual relinking wont be fun. (In reply to Marcel de Rooy from comment #10) > (In reply to Katrin Fischer from comment #9) > > Could it be an option to only allow merging when the 'losing' record is > > unused? In this case there would be no data loss and a warning would not be > > necessary. > > I dont think so. Manual relinking wont be fun. Not sure if we understood each other. What I mean it merging an authority record that is not linked (used) in any bibliographic record. So no relinking would be necessary. (In reply to Katrin Fischer from comment #11) > (In reply to Marcel de Rooy from comment #10) > > (In reply to Katrin Fischer from comment #9) > > > Could it be an option to only allow merging when the 'losing' record is > > > unused? In this case there would be no data loss and a warning would not be > > > necessary. > > > > I dont think so. Manual relinking wont be fun. > > Not sure if we understood each other. What I mean it merging an authority > record that is not linked (used) in any bibliographic record. So no > relinking would be necessary. We understand each other :) And I would say: No, thats a bad idea. Manual relinking the ones who are used, wont be fun. But why would you have to manually relink those if the used record is the winner? No changes in the bibliographic record woudl be necessary. Hi ! In my understanding (I can be wrong), Marcel is saying that we shouldn't only allow merging when the losing record is unused, because if we notice two record we want to merge and both of them are used, we will have to manually relink them (to make one used and the other not). And only then we can merge the record. So it's not the actual merging that would be a problem but the process before, to make the merge possible. (In reply to marion.durand from comment #14) > Hi ! > In my understanding (I can be wrong), Marcel is saying that we shouldn't > only allow merging when the losing record is unused, because if we notice > two record we want to merge and both of them are used, we will have to > manually relink them (to make one used and the other not). And only then we > can merge the record. > > So it's not the actual merging that would be a problem but the process > before, to make the merge possible. I think the relinking of records of the same authority type is a solved problem. I was thinking about use cases where we could safely allow merging of different auhority types where the relinking is much harder because the MARC fields are not the same in MARC21 for different. ... for different types of entries (think of 100/110/111 etc.) Tried on a sandbox, doesn't apply : TASK [Apply bug 25387 via git-bz in docker container] ************************** fatal: [localhost -> koha-bz25387]: FAILED! => {"changed": true, "cmd": "cd /kohadevbox/koha && yes | git bz apply 25387", "delta": "0:00:07.694919", "end": "2022-09-08 14:15:09.992354", "msg": "non-zero return code", "rc": 1, "start": "2022-09-08 14:15:02.297435", "stderr": "error: Failed to merge in the changes.\nhint: Use 'git am --show-current-patch=diff' to see the failed patch\nPatch left in /tmp/Bug-25387-Merging-different-authority-types-create-RaNVft.patch", "stderr_lines": ["error: Failed to merge in the changes.", "hint: Use 'git am --show-current-patch=diff' to see the failed patch", "Patch left in /tmp/Bug-25387-Merging-different-authority-types-create-RaNVft.patch"], "stdout": "Applying: Bug 25387: Merging different authority types create no warning\nUsing index info to reconstruct a base tree...\nM\tkoha-tmpl/intranet-tmpl/prog/en/includes/merge-record.inc\nM\tkoha-tmpl/intranet-tmpl/prog/en/modules/authorities/merge.tt\nFalling back to patching base and 3-way merge...\nAuto-merging koha-tmpl/intranet-tmpl/prog/en/modules/authorities/merge.tt\nAuto-merging koha-tmpl/intranet-tmpl/prog/en/includes/merge-record.inc\nCONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/includes/merge-record.inc\nPatch failed at 0001 Bug 25387: Merging different authority types create no warning\nWhen you have resolved this problem run \"git bz apply --continue\".\nIf you would prefer to skip this patch, instead run \"git bz apply --skip\".\nTo restore the original branch and stop patching run \"git bz apply --abort\".\n\nBug 25387 - Avoid merge different type of authorities\n\n126588 - Bug 25387: Merging different authority types create no warning\n\nApply? [(y)es, (n)o, (i)nteractive] ", "stdout_lines": ["Applying: Bug 25387: Merging different authority types create no warning", "Using index info to reconstruct a base tree...", "M\tkoha-tmpl/intranet-tmpl/prog/en/includes/merge-record.inc", "M\tkoha-tmpl/intranet-tmpl/prog/en/modules/authorities/merge.tt", "Falling back to patching base and 3-way merge...", "Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/authorities/merge.tt", "Auto-merging koha-tmpl/intranet-tmpl/prog/en/includes/merge-record.inc", "CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/includes/merge-record.inc", "Patch failed at 0001 Bug 25387: Merging different authority types create no warning", "When you have resolved this problem run \"git bz apply --continue\".", "If you would prefer to skip this patch, instead run \"git bz apply --skip\".", "To restore the original branch and stop patching run \"git bz apply --abort\".", "", "Bug 25387 - Avoid merge different type of authorities", "", "126588 - Bug 25387: Merging different authority types create no warning", "", "Apply? [(y)es, (n)o, (i)nteractive] "]} I am late to this party, but if I'm merging auts together where the correct/new one is a 151 and wrong/old one is a 150 (with wrong/old 650s in the bibs), then I want the 650s in the bibs changed to 651s, linked to the new aut. I would want a warning during the aut merge to alert me that this is a weird/unusual merge, and to make me think about it, but then I'd want to be able to go ahead. Fictitious people headings do change, e.g., 150 _0 Baggins, Bilbo (Fictitious character) to 100 1_ Baggins, Bilbo And if I accidentally have these two authorities in my catalog, I would want to merge them, and have the 650s in the bibs updated to linked 600s. If I can't have the bibs updated with the merge, then a warning directing me to the fact that I'll have to somehow manually update the now incorrect 650s in the bibs would be very good. Cheers! --h2 I agree with Heather. I recently tried merging a 155 (genre) with a 150 (topical). I wanted the corresponding 655 to survive and the 650's changed to 655 with the correct link. The merge appeared to fail as both merge candidates disappeared - meaning I can't find them in the database. From a workflow perspective this kind of a merge, with warning, is an ideal way to clean up authorities. As a workaround, which I have not tested, I would need to do a batch bib change to the authority records linked with the incorrect 650 to the correct 655 and then go back and delete the 150 authority. This is much more work, in my opinion. Created attachment 167226 [details] [review] Bug 25387: Merging different authority types create no warning Merging two different authorities types can result in the loss of some field. This patch adds a warning when merging different type of authorities and add more display of authorities types during merge. To test: 1- Find two authorities you what to merge. Be sure that these authorities have different type 2- Search for these authorities (be sure to have both results on the results page) 3- For the first authority click on "Actions" then on "Merge", same for the second one 4- Check that koha is asking you to choose a framework and that authority types are not displayed 5- Choose a framework, then click on next 6- Check that the authority type is not displayed in the tabs and that no warning appear 7- Apply the patch 8- Repeat step 1 to 3 again 9- Check that authority type is now displayed next to their ID 10- Repeate setp 5 again 11- Check that the authority types is now displayed in the tabs next to their ID and that a warning appear Created attachment 167227 [details] [review] Bug 25387: Warn when merging different authority types Merging two different authorities types can result in the loss of some field. This patch adds a warning when merging different type of authorities and add more display of authorities types during merge. To test: 1- Find two authorities you what to merge. Be sure that these authorities have different type 2- Search for these authorities (be sure to have both results on the results page) 3- For the first authority click on "Actions" then on "Merge", same for the second one 4- Check that koha is asking you to choose a framework and that authority types are not displayed 5- Choose a framework, then click on next 6- Check that the authority type is not displayed in the tabs and that no warning appear 7- Apply the patch 8- Repeat step 1 to 3 again 9- Check that authority type is now displayed next to their ID 10- Repeate setp 5 again 11- Check that the authority types is now displayed in the tabs next to their ID and that a warning appear Patch rebase and commit message + bug description multiple auth types is too complex to test in Template, moved to perl. Created attachment 167258 [details] [review] Bug 25387: Warn when merging different authority types Merging two different authorities types can result in the loss of some field. This patch adds a warning when merging different type of authorities and add more display of authorities types during merge. To test: 1- Find two authorities you what to merge. Be sure that these authorities have different type 2- Search for these authorities (be sure to have both results on the results page) 3- For the first authority click on "Actions" then on "Merge", same for the second one 4- Check that koha is asking you to choose a framework and that authority types are not displayed 5- Choose a framework, then click on next 6- Check that the authority type is not displayed in the tabs and that no warning appear 7- Apply the patch 8- Repeat step 1 to 3 again 9- Check that authority type is now displayed next to their ID 10- Repeate setp 5 again 11- Check that the authority types is now displayed in the tabs next to their ID and that a warning appear Signed-off-by: David Nind <david@davidnind.com> Created attachment 168099 [details] [review] Bug 25387: Warn when merging different authority types Merging two different authorities types can result in the loss of some field. This patch adds a warning when merging different type of authorities and add more display of authorities types during merge. To test: 1- Find two authorities you what to merge. Be sure that these authorities have different type 2- Search for these authorities (be sure to have both results on the results page) 3- For the first authority click on "Actions" then on "Merge", same for the second one 4- Check that koha is asking you to choose a framework and that authority types are not displayed 5- Choose a framework, then click on next 6- Check that the authority type is not displayed in the tabs and that no warning appear 7- Apply the patch 8- Repeat step 1 to 3 again 9- Check that authority type is now displayed next to their ID 10- Repeate setp 5 again 11- Check that the authority types is now displayed in the tabs next to their ID and that a warning appear Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 168100 [details] [review] Bug 25387: (QA follow-up) Tidy Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Pushed for 24.11! Well done everyone, thank you! Backported to 24.05.x for upcoming 24.05.02 Pushed to 23.11.x for 23.11.07 Backported to 23.05.x for 23.05.15 |