Bug 22548 - Z39.50/SRU search replaces existing biblios
Summary: Z39.50/SRU search replaces existing biblios
Status: RESOLVED DUPLICATE of bug 32172
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: 22.05
Hardware: All All
: P2 major
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-20 13:22 UTC by Rudolf Byker
Modified: 2023-09-23 21:15 UTC (History)
5 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rudolf Byker 2019-03-20 13:22:12 UTC
Possibly related, but not the same: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15360

Reproducing:

- Search for a book under "Search the catalog", e.g. /cgi-bin/koha/catalogue/search.pl?q=movement
- Note the biblionumber of the last book of the first page of the search results. It's 10624 in my case, and the title is "A political history of early Christianity".
- Now click "Z39.50/SRU search" in the toolbar (between "Place hold" and "Sort").
- Click search in the popup window and wait for results.
- Choose any book from the results and click "Actions" -> "Import". In my case I'm picking a book called "Against capital punishment".
- The popup closes, and the catalog search results tab is directed to /cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=10624&z3950=1&breedingid=411522

Expected behaviour:

- The title of the addbiblio.pl page should be "Add MARC record".
- Clicking "Save" should add a new record to the catalog.

Current behaviour:

- The title of the addbiblio.pl page is "Editing Against capital punishment [electronic resource] : the anti-death penalty movement in America, 1972-1994 / Herbert H. Haines. (Record number 10624)". Note that this is the biblionumber of an existing book. More specifically, the last one from the first page of the search results mentioned above.
- Clicking "Save" replaces "A political history of early Christianity" with "Against capital punishment".

Additional information:

Following the same process, but starting on "Cataloging Search" at /cgi-bin/koha/cataloguing/addbooks.pl instead of "Search the catalog" does NOT cause this problem, but causes a the MARC record to be imported as a NEW biblio, as expected.
Comment 1 Marcel de Rooy 2019-11-21 11:03:19 UTC
I tested on 18.05.something and on current master, and could not reproduce the issue.
I note that you marked it as 18.11.
Comment 2 Pablo AB 2023-02-24 20:56:42 UTC
I recently had this issue on a Koha 22.05.09-1. I believe this should be raised to major, since imply lost of information; unintentionally replacing biblio records by librarians.
Comment 3 Noémie Labine 2023-06-21 18:48:10 UTC
We encountered this situation with 22.05.07.000

Clicking on the z39.50 search button while on a results page causes the replacement of the last biblio record of the page by the imported biblio record, as described by Rudolf in 2019.
Comment 4 Marcel de Rooy 2023-07-20 12:12:56 UTC
I tried on master and 21.11 and cannot reproduce. I only saw URL where biblionumber in the URL was empty. So in that case there is no overwrite.

Please provide the steps in a more accurate way to reproduce.
Comment 5 Marcel de Rooy 2023-07-20 12:13:48 UTC
Is there any preference or so involved in the game ?
Comment 6 Marcel de Rooy 2023-07-20 12:44:55 UTC
[14:26] <Joubu> js/pages/results.js 
[14:26] <Joubu> 394 function PopupZ3950() {
[14:26] <Joubu> is using strQuery
[14:27] <Joubu> 631         $template->param (z3950_search_params => C4::Search::z3950_search_args($z3950par || $query_desc));
[14:27] <Joubu> because before we had: catalogue/results.tt
[14:27] <Joubu> 812         [%- FOREACH z3950_search_param IN z3950_search_params -%]
[14:27] <Joubu> 813             strQuery += "&" + "[% z3950_search_param.name |uri %]" + "=" + "[% z3950_search_param.value |uri %]";
[14:27] <Joubu> 814         [%- END -%]

[14:29] <Joubu> I can easily imagine a generic 'biblionumber' coming from somewhere else
Comment 7 Katrin Fischer 2023-09-23 21:15:10 UTC

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