Description
Nick Clemens (kidclamp)
2019-12-18 18:12:10 UTC
Created attachment 96453 [details] [review] Bug 24267: Improve ImportBreedingAuth Looks good at first glance. You add: +# warn Data::Dumper::Dumper( $query ); Created attachment 96482 [details] [review] Bug 24267: Improve ImportBreedingAuth (In reply to Marcel de Rooy from comment #2) > Looks good at first glance. > > You add: > +# warn Data::Dumper::Dumper( $query ); Heh, bum for bug 24103 Any chance to extend Breeding.t for this sub ;) Sorry.. Created attachment 96496 [details] [review] Bug 24267: Unit tests (In reply to Marcel de Rooy from comment #5) > Any chance to extend Breeding.t for this sub ;) Sorry.. I did very brief, let me know if there are more cases to cover Created attachment 96497 [details] [review] Bug 24267: Unit tests Created attachment 96502 [details] [review] Bug 24267: Improve ImportBreedingAuth Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Created attachment 96503 [details] [review] Bug 24267: Unit tests Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Created attachment 96504 [details] [review] Bug 24267: (QA follow-up) Remove two calls, add transaction Call to GetAuthorizedHeading is already done just before calling ImportBreedingAuth. Call to GuessAuthTypeCode is not used. Adding transaction to test (check your database, kidclamp ;) Test plan: Add new authority via Z3950 in the interface. Run t/db_dependent/Breeding.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Created attachment 96741 [details] [review] 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> Created attachment 96742 [details] [review] Bug 24267: Unit tests Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 96743 [details] [review] Bug 24267: (QA follow-up) Remove two calls, add transaction Call to GetAuthorizedHeading is already done just before calling ImportBreedingAuth. Call to GuessAuthTypeCode is not used. Adding transaction to test (check your database, kidclamp ;) Test plan: Add new authority via Z3950 in the interface. Run t/db_dependent/Breeding.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Nice work everyone! Pushed to master for 20.05 Pushed to 19.11.x branch for 19.11.02 backported to 19.05.x for 19.05.07 Enhancement will not be backported to 18.11.x series. |