Bug 24267: Improve ImportBreedingAuth
authorNick Clemens <nick@bywatersolutions.com>
Wed, 18 Dec 2019 18:27:33 +0000 (18:27 +0000)
committerLucas Gass <lucas@bywatersolutions.com>
Wed, 15 Jan 2020 18:47:21 +0000 (18:47 +0000)
commit42f423675a3989b88717d085c4ae760b612c8090
tree72b83b60a157c8efd747df97cb6d5e4271734b91
parentd83c15422040b6ceb2b02ea203de3b803a107353
Bug 24267: Improve ImportBreedingAuth

git grep ImportBreedingAuth - there is only one call to this routine
from SearchZ3950Auth

We pass it a MARC record, '2' for overwrite_auth

We then check for this record in the DB and get the breeding id,
however, when overwrite_auth is 2 we always add the auth to the batch
and return the new breeding id.

We don't actually use any of the other parameters returned here either

To recreate:
1 - Browse to Authorities
2 - Select New form Z3950
3 - Perform a search that returns results
4 - SELECT COUNT(*) FROM import_auths
5 - Repeat the search
6 - SELECT COUNT(*) FROM import_auths
7 - There are 20 more records
8 - SELECT * FROM import_auths - note the repeated rows

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit dcb7e9cb50c18a113472d5cd8405ba082bce6ec2)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
C4/Breeding.pm