Bug 41739

Summary: Improve the authority merge warning
Product: Koha Reporter: Esther Melander <esther.melander>
Component: CatalogingAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: m.de.rooy, phil
Version: 25.05   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Authority merge warning

Description Esther Melander 2026-01-30 17:46:44 UTC
Created attachment 192261 [details]
Authority merge warning

Bug 25387 introduced a warning when attempting to merge different authority types. The message is below the comparison boxes in yellow. The warning is not a strong enough visual cue to warn the user. It would be helpful to move the warning above the comparison boxes and change the warning to red text in bold or something much visually stronger.

It also might be worth considering blocking the ability to merge different authorities types since proceeding with the merge results in data loss.
Comment 1 Phil Ringnalda 2026-02-03 07:04:56 UTC
(In reply to Esther Melander from comment #0)
> It also might be worth considering blocking the ability to merge different
> authorities types since proceeding with the merge results in data loss.

It might be, if it *did* result in data loss. The actual case is that it might result in data loss, for some combinations of authority types linked to some bib fields.

 I think the cause of the warning is merging something like a personal name to a topical term, which would work fine for 600 to 650 but wouldn't be able to convert a 100 or 700 or 800 because there aren't any x50 equivalents. Not sure, since I've never needed to do that merge.

But I frequently need to merge 150 to 100, since the Library of Congress is in the middle of a very long conversion of (Fictitious character) headings. Removing the ability to do that despite a warning which doesn't apply to that case would be a huge frustration.
Comment 2 Esther Melander 2026-02-03 16:22:15 UTC
I have not seen an instance where merging different authority types did work, though it might be possible. Regardless, the behavior described in Bug 25387 still happens:

"for example merging Turkey(topic) with Turkey(geographic) the result is all 650$aTurkey dissapear"

"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."

The heading disappears from the bibliographic record and in the one example from the database entirely. I have experienced this when merging a topical term with a genre. Ideally, the headings in the bibliographic record should be updated to the surviving heading and linked. That does not happen.
Comment 3 Phil Ringnalda 2026-02-04 00:04:27 UTC
Are those failures that are reproducible for you? I tried merging 150 Turkey to 151 Turkey, and also a 150 to a 155, and in both cases wound up with both linked bib records correctly having 651 Turkey and 655 Testgenre.

Were the cases where you saw failure ones where there were hundreds or thousands of linked bib records, more than the value of the system preference AuthorityMergeLimit? I've long been suspicious of its deferred merges, but never been able to reproduce failure in them. But that wouldn't be specific to different authority types.