Bug 39275

Summary: Merging records can destroy records if page has not fully loaded
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: CatalogingAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: dmeininger591, m.de.rooy, phil
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Katrin Fischer 2025-03-07 16:26:31 UTC
We just had a case where a lot of records where merged while the instance was slowed down significantly (crawlers) and the records ended up emptied out completely.

As far as we can tell, this is what happened:

* Select 2 records to merge from catalog or cataloguing search
* Select "winner" record
* On the next page, the second column with the "winner" is loaded a little after the rest of the page
-> When you merge before it's loaded, the record is emptied out
-> Wait until the page is fully loaded, the record will be ok.

Maybe we could lock the "Merge records" button, until the page is fully loaded?
Comment 1 Phil Ringnalda 2025-03-07 19:45:30 UTC
Also happens with merging authority records, but at least there it says something like "We found no MARC tags in the destination record" and doesn't save an empty record. But I've always worried that it would be willing to save a half-record, if the destination partly loads and then stalls.
Comment 2 dmeininger591 2025-04-14 19:35:27 UTC
I experienced this bug twice on March 31st 2025. The records were not particularly large, 25-40 items on each. When I merged them the MARC information was completely deleted but the item information was still there. It was easy enough to re-download the MARC record but caused a bit of panic for me at first. I will try to keep an eye on the page loading in future merges.