[Bug 24267] New: C4::Breeding::ImportBreedingAuth is ineffective
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24267 Bug ID: 24267 Summary: C4::Breeding::ImportBreedingAuth is ineffective Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: MARC Authority data support Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org 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 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24267 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org, | |m.de.rooy@rijksmuseum.nl, | |martin.renvoize@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24267 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24267 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 96453 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96453&action=edit Bug 24267: Improve ImportBreedingAuth -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24267 --- Comment #2 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Looks good at first glance. You add: +# warn Data::Dumper::Dumper( $query ); -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24267 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #96453|0 |1 is obsolete| | --- Comment #3 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 96482 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96482&action=edit Bug 24267: Improve ImportBreedingAuth -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24267 --- Comment #4 from Nick Clemens <nick@bywatersolutions.com> --- (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 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24267 --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Any chance to extend Breeding.t for this sub ;) Sorry.. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24267 --- Comment #6 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 96496 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96496&action=edit Bug 24267: Unit tests -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24267 --- Comment #7 from Nick Clemens <nick@bywatersolutions.com> --- (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 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24267 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #96496|0 |1 is obsolete| | --- Comment #8 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 96497 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96497&action=edit Bug 24267: Unit tests -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24267 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24267 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #96482|0 |1 is obsolete| | --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 96502 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96502&action=edit Bug 24267: Improve ImportBreedingAuth Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24267 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #96497|0 |1 is obsolete| | --- Comment #10 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 96503 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96503&action=edit Bug 24267: Unit tests Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24267 --- Comment #11 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 96504 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96504&action=edit 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> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24267 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24267 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=24286 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24267 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24267 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #96502|0 |1 is obsolete| | Attachment #96503|0 |1 is obsolete| | Attachment #96504|0 |1 is obsolete| | --- Comment #12 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 96741 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96741&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24267 --- Comment #13 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 96742 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96742&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24267 --- Comment #14 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 96743 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96743&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24267 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |20.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24267 --- Comment #15 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work everyone! Pushed to master for 20.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24267 Joy Nelson <joy@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |joy@bywatersolutions.com Version(s)|20.05.00 |20.05.00, 19.11.02 released in| | Status|Pushed to master |Pushed to stable --- Comment #16 from Joy Nelson <joy@bywatersolutions.com> --- Pushed to 19.11.x branch for 19.11.02 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24267 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Status|Pushed to stable |Pushed to oldstable --- Comment #17 from Lucas Gass <lucas@bywatersolutions.com> --- backported to 19.05.x for 19.05.07 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24267 Hayley Mapley <hayleymapley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hayleymapley@catalyst.net.n | |z --- Comment #18 from Hayley Mapley <hayleymapley@catalyst.net.nz> --- Enhancement will not be backported to 18.11.x series. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org