[Bug 26231] New: bulkmarcimport.pl does not import authority if it already has a 001 field
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26231 Bug ID: 26231 Summary: bulkmarcimport.pl does not import authority if it already has a 001 field Change sponsored?: --- Product: Koha Version: 19.11 Hardware: All OS: All Status: NEW Severity: critical Priority: P5 - low Component: MARC Bibliographic record staging/import Assignee: koha-bugs@lists.koha-community.org Reporter: dcook@prosentient.com.au QA Contact: testopia@bugs.koha-community.org I'm trying to import authorities which already have a 001 and bulkmarcimport.pl says that it's worked but it hasn't actually imported anything and no errors have been thrown. I'm using this command: koha-shell -c "perl /usr/share/koha/bin/migration_tools/bulkmarcimport.pl -file /home/dcook/auth.mrc -a -fk -d -v -l /tmp/auth.log" <instance> It appears to be because the value from the 001 is being passed to AddAuthority() which - instead of adding the authority - is trying to update an existing authority. -- 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=26231 --- Comment #1 from David Cook <dcook@prosentient.com.au> --- Created attachment 108431 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=108431&action=edit Bug 26231: Remove incorrect use of AddAuthority() when 001 present This patch removes the use of AddAuthority with a non-empty authid argument, since that triggers an update rather than an insert. In practice, the update also fails, but the error isn't raised, as the database connection doesn't have RaiseError set. Test plan: 1) Do not apply patch 2) Try to bulkmarcimport an authority file with a 001 3) Observe that the script reports success but no authority is added 4) Apply the path 5) Try to bulkmarcimport an authority file with a 001 6) Observe that the script reports success and the authority is added -- 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=26231 David Cook <dcook@prosentient.com.au> 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=26231 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|19.11 |master -- 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=26231 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |dcook@prosentient.com.au |ity.org | CC| |jonathan.druart@bugs.koha-c | |ommunity.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=26231 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #2 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Looks logical. Maybe just log that value of 001 will be lost no ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26231 --- Comment #3 from David Cook <dcook@prosentient.com.au> --- (In reply to Fridolin SOMERS from comment #2)
Looks logical. Maybe just log that value of 001 will be lost no ?
Possibly although that's already the case now? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26231 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I think Bug 12722 - bulkmarcimport.pl: Should we move the old 001 to 035 would deal with the issue of the lost 001. I am adding Marcel here, if I IIRC this is related to work he did a while ago. (Bug 18014) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26231 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26231 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #108431|0 |1 is obsolete| | --- Comment #5 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 110448 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110448&action=edit Bug 26231: Remove incorrect use of AddAuthority() when 001 present This patch removes the use of AddAuthority with a non-empty authid argument, since that triggers an update rather than an insert. In practice, the update also fails, but the error isn't raised, as the database connection doesn't have RaiseError set. Test plan: 1) Do not apply patch 2) Try to bulkmarcimport an authority file with a 001 3) Observe that the script reports success but no authority is added 4) Apply the path 5) Try to bulkmarcimport an authority file with a 001 6) Observe that the script reports success and the authority is added Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26231 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #110448|0 |1 is obsolete| | --- Comment #6 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 110761 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110761&action=edit Bug 26231: Remove incorrect use of AddAuthority() when 001 present This patch removes the use of AddAuthority with a non-empty authid argument, since that triggers an update rather than an insert. In practice, the update also fails, but the error isn't raised, as the database connection doesn't have RaiseError set. Test plan: 1) Do not apply patch 2) Try to bulkmarcimport an authority file with a 001 3) Observe that the script reports success but no authority is added 4) Apply the path 5) Try to bulkmarcimport an authority file with a 001 6) Observe that the script reports success and the authority is added Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26231 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |julian.maurice@biblibre.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26231 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |20.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26231 --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 20.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26231 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|20.11.00 |20.11.00, 20.05.05 released in| | CC| |lucas@bywatersolutions.com Status|Pushed to master |Pushed to stable --- Comment #8 from Lucas Gass <lucas@bywatersolutions.com> --- backported to 20.05.x for 20.05.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26231 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable CC| |aleisha@catalyst.net.nz Version(s)|20.11.00, 20.05.05 |20.11.00, 20.05.05, released in| |19.11.11 --- Comment #9 from Aleisha Amohia <aleisha@catalyst.net.nz> --- backported to 19.11.x for 19.11.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26231 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net Status|Pushed to oldstable |Pushed to oldoldstable Version(s)|20.11.00, 20.05.05, |20.11.00, 20.05.05, released in|19.11.11 |19.11.11, 19.05.16 --- Comment #10 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Backported to 19.05.x branch for 19.05.16 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org