[Koha-bugs] [Bug 35591] bulkmarcimport.pl overwrites data if controlnumber eq authid
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Sun Feb 25 18:47:31 CET 2024
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35591
Victor Grousset/tuxayo <victor at tuxayo.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #161306|0 |1
is obsolete| |
--- Comment #8 from Victor Grousset/tuxayo <victor at tuxayo.net> ---
Created attachment 162409
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=162409&action=edit
Bug 35591: Prevent bulkmarcimport from replacing local auth_header
If you run bulkmarcimport,pl on authorities with --update (or --all)
it will overwrite a local auth_header if the auth_id of a local
auth_header matches the control-number (field 001) of an imported MARC
record.
This patch adds a new option --guessauthid (which is still enabled by
default to keep the script backwards compatible, but broken), which can
turn off this behaviour if called as --noguessauthid.
To test with koha-testing-docker:
* Inspect cgi-bin/koha/authorities/detail.pl?authid=1402 which should be
PERSO_NAME of Aristotles.
* get the file twin_040682714.xml from Bugzilla and make it available
inside of koha-testing-docker
* run:
misc/migration_tools/bulkmarcimport.pl -m MARCXML -c utf8 -a --file
twin_040682714.xml --all --match isbn,001
* Check cgi-bin/koha/authorities/detail.pl?authid=1402, which now is a
TOPIC_TERM "Zwilling" (twin...)
Reset koha-testing-docker, apply the patch
* run with the new flag
misc/migration_tools/bulkmarcimport.pl -m MARCXML -c utf8 -a --file
twin_040682714.xml --all --match isbn,001 --noguessauthid
* cgi-bin/koha/authorities/detail.pl?authid=1402 still is "Aristotle"
* "Zwilling" is cgi-bin/koha/authorities/detail.pl?authid=1708 (at least
on my ktd, the actual id might vary)
Sponsored-by: Steiermärkische Landesbibliothek
Signed-off-by: Victor Grousset/tuxayo <victor at tuxayo.net>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list