[Bug 5683] New: link_bibs_to_authorities.pl can corrupt records
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5683 Summary: link_bibs_to_authorities.pl can corrupt records Change sponsored?: --- Product: Koha Version: unspecified Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P5 Component: Command-line Utilities AssignedTo: gmcharlt@gmail.com ReportedBy: jcamins@cpbibliography.com QAContact: koha-bugs@lists.koha-community.org Estimated Hours: 0.0 It seems that running link_bibs_to_authorities.pl can corrupt records in cases where there is a heading with only subfield 9 populated, since the script automatically removes all subfield 9s. The script should check that all fields it outputs have at least subfield, and delete and fields that don't have any subfields. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5683 --- Comment #1 from Ian Walls <ian.walls@bywatersolutions.com> 2011-02-02 16:55:14 UTC --- Created attachment 3053 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=3053 Signed off Patch -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5683 Ian Walls <ian.walls@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ian.walls@bywatersolutions. | |com Version|unspecified |rel_3_4 -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5683 Nicole C. Engard <nengard@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 |PATCH-Sent CC| |nengard@gmail.com Patch Status|--- |Signed Off AssignedTo|gmcharlt@gmail.com |jcamins@cpbibliography.com -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5683 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz Severity|enhancement |critical --- Comment #2 from Chris Cormack <chris@bigballofwax.co.nz> 2011-02-02 20:38:12 UTC --- This passes its tests perl t/db_dependent/Biblio.t 1..6 ok 1 - use C4::Biblio; ok 2 - Makes sure title field in biblio is empty. ok 3 - uses ModBiblio to add a title to the previously created record and checks that its there. ok 4 - Makes sure the isbn is still there after using ModBiblio. ok 5 - First test of GetBiblioItemData to get same result of previous two GetBiblioData tests. ok 6 - Second test checking it returns the correct isbn. Pushed, and reclassified to be a bugfix not an enhancement (otherwise it will not be pulled for 3.2.x) Please test. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5683 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Signed Off |Patch Pushed -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5683 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #3 from Jared Camins-Esakov <jcamins@cpbibliography.com> 2011-02-24 15:29:55 UTC --- This particular issue is fixed in Master. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5683 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|PATCH-Sent |P1 Status|RESOLVED |REOPENED Resolution|FIXED | --- Comment #4 from Jared Camins-Esakov <jcamins@cpbibliography.com> 2011-04-06 11:30:07 UTC --- It turns out that this particular type of corruption is not limited to C4::Biblio. It is also possible to corrupt records in C4::Charset. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5683 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P1 |PATCH-Sent Patch Status|Patch Pushed |Needs Signoff --- Comment #5 from Jared Camins-Esakov <jcamins@cpbibliography.com> 2011-04-06 14:16:25 UTC --- There are two follow-up patches that need sign off. Both have been sent to the list. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5683 stephane.delaune@biblibre.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |stephane.delaune@biblibre.c | |om --- Comment #6 from stephane.delaune@biblibre.com 2011-04-07 09:25:23 UTC --- perl t/db_dependent/Biblio.t 1..6 ok 1 - use C4::Biblio; ok 2 - Makes sure title field in biblio is empty. This does not passes its tests not ok 3 - uses ModBiblio to add a title to the previously created record and checks that its there. # Failed test 'uses ModBiblio to add a title to the previously created record and checks that its there.' # at t/db_dependent/Biblio.t line 30. # got: undef # expected: 'Foundation' not ok 4 - Makes sure the isbn is still there after using ModBiblio. # Failed test 'Makes sure the isbn is still there after using ModBiblio.' # at t/db_dependent/Biblio.t line 31. # got: undef # expected: '0590353403' not ok 5 - First test of GetBiblioItemData to get same result of previous two GetBiblioData tests. # Failed test 'First test of GetBiblioItemData to get same result of previous two GetBiblioData tests.' # at t/db_dependent/Biblio.t line 34. # got: undef # expected: 'Foundation' not ok 6 - Second test checking it returns the correct isbn. # Failed test 'Second test checking it returns the correct isbn.' # at t/db_dependent/Biblio.t line 35. # got: undef # expected: '0590353403' # Looks like you failed 4 tests of 6. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5683 stephane.delaune@biblibre.com changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Needs Signoff |Failed QA -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5683 --- Comment #7 from Jared Camins-Esakov <jcamins@cpbibliography.com> 2011-04-07 12:25:06 UTC --- Which patch were you testing? The first follow-up? I can't duplicate the results of your test. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5683 --- Comment #8 from stephane.delaune@biblibre.com 2011-04-07 14:52:02 UTC --- (In reply to comment #7)
Which patch were you testing? The first follow-up? I can't duplicate the results of your test.
I was test this patch : http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=3053 -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5683 --- Comment #9 from Jared Camins-Esakov <jcamins@cpbibliography.com> 2011-04-07 14:56:35 UTC --- Stephane, That patch has already been pushed. The two follow-up patches that need signing off were sent to the list. Regards, Jared -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5683 --- Comment #10 from Jared Camins-Esakov <jcamins@cpbibliography.com> 2011-04-08 12:05:14 UTC --- Created attachment 3834 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=3834 Follow-up patch (1 of 2) -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5683 --- Comment #11 from Jared Camins-Esakov <jcamins@cpbibliography.com> 2011-04-08 12:05:49 UTC --- Created attachment 3835 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=3835 Follow-up patch (2 of 2) -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5683 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Failed QA |Needs Signoff --- Comment #12 from Jared Camins-Esakov <jcamins@cpbibliography.com> 2011-04-08 12:06:42 UTC --- I have attached the two follow-up patches to the bug. Sorry about the confusion. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5683 --- Comment #13 from Chris Cormack <chris@bigballofwax.co.nz> 2011-04-11 21:54:22 UTC --- Can someone please test the 2 follow up bugs, there are 3 critical bugs for 3.4 needing sign off, this is one of them -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5683 --- Comment #14 from Jared Camins-Esakov <jcamins@cpbibliography.com> 2011-04-15 21:25:44 UTC --- For testing it may be better to apply the second follow-up patch first (and run perl t/db_dependent/Biblio.t), to confirm the incorrect behavior exists, and then apply the first follow-up patch to fix it (and rerun the test). -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5683 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Needs Signoff |Signed Off --- Comment #15 from Chris Cormack <chris@bigballofwax.co.nz> 2011-05-13 02:08:24 UTC --- Applied the patch containing the updated tests, ran the test rorohiko:[git/5683-]:~/git/koha% perl t/db_dependent/Biblio.t 1..9 ok 1 - use C4::Biblio; DBD::mysql::db do failed: Unknown or incorrect time zone: 'Pacific/Auckland' at C4/Context.pm line 700, <DATA> line 496. ok 2 - Makes sure title field in biblio is empty. ok 3 - uses ModBiblio to add a title to the previously created record and checks that its there. ok 4 - Makes sure the isbn is still there after using ModBiblio. ok 5 - First test of GetBiblioItemData to get same result of previous two GetBiblioData tests. ok 6 - Second test checking it returns the correct isbn. ok 7 - ModBiblio handles authority-linked 655 ok 8 - ModBiblio handles 655 with authority link but no heading # Field 655 must have indicators (use ' ' for empty indicators) at C4/Charset.pm line 141 not ok 9 - ModBiblio handles 655 with no subfields # Failed test 'ModBiblio handles 655 with no subfields' # at t/db_dependent/Biblio.t line 70. # Looks like you failed 1 test of 9. Applied the patch to fix it rorohiko:[git/5683-]:~/git/koha% perl t/db_dependent/Biblio.t 1..9 ok 1 - use C4::Biblio; DBD::mysql::db do failed: Unknown or incorrect time zone: 'Pacific/Auckland' at C4/Context.pm line 700, <DATA> line 496. ok 2 - Makes sure title field in biblio is empty. ok 3 - uses ModBiblio to add a title to the previously created record and checks that its there. ok 4 - Makes sure the isbn is still there after using ModBiblio. ok 5 - First test of GetBiblioItemData to get same result of previous two GetBiblioData tests. ok 6 - Second test checking it returns the correct isbn. ok 7 - ModBiblio handles authority-linked 655 ok 8 - ModBiblio handles 655 with authority link but no heading ok 9 - ModBiblio handles 655 with no subfield Patch fixes the issue, signing off -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5683 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #3053|0 |1 is obsolete| | Attachment #3834|0 |1 is obsolete| | Attachment #3835|0 |1 is obsolete| | --- Comment #16 from Chris Cormack <chris@bigballofwax.co.nz> 2011-05-13 02:10:07 UTC --- Created attachment 4093 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=4093 Signed off follow up 1 -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5683 --- Comment #17 from Chris Cormack <chris@bigballofwax.co.nz> 2011-05-13 02:10:40 UTC --- Created attachment 4094 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=4094 Signed off follow up 2 -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5683 Ian Walls <ian.walls@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Signed Off |Passed QA --- Comment #18 from Ian Walls <ian.walls@bywatersolutions.com> 2011-06-01 14:14:04 UTC --- Applied patch 1, tested: tests failed. Applied patch 2, tested: tests succeeded. Marking as Passed QA -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5683 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Passed QA |Patch Pushed --- Comment #19 from Chris Cormack <chris@bigballofwax.co.nz> 2011-06-01 21:13:23 UTC --- Pushed to master -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5683 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |FIXED --- Comment #20 from Jared Camins-Esakov <jcamins@cpbibliography.com> 2011-07-08 14:37:02 UTC --- Seems to be working now. Closing. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5683 Paul A <paul.a@aandc.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED CC| |paul.a@aandc.org Resolution|FIXED | --- Comment #21 from Paul A <paul.a@aandc.org> 2012-01-06 20:46:55 UTC --- This is NOT resolved; it can lead to *un-linking* all biblio-authority links under some circumstances, with only restore from backup as a work-around. stdout: ./bin/link_bibs_to_authorities.pl /.../ Bib authority heading linking report ------------------------------------ Number of bibs checked: 14911 Number of bibs modified: 14886 Number of bibs with errors: 0 "modified" == removed. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5683 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |FIXED --- Comment #22 from Jared Camins-Esakov <jcamins@cpbibliography.com> 2012-01-06 20:49:03 UTC --- (In reply to comment #21)
This is NOT resolved; it can lead to *un-linking* all biblio-authority links under some circumstances, with only restore from backup as a work-around.
stdout:
./bin/link_bibs_to_authorities.pl /.../ Bib authority heading linking report ------------------------------------ Number of bibs checked: 14911 Number of bibs modified: 14886 Number of bibs with errors: 0
"modified" == removed.
Please see bug 7284 for a fix for that. This particular bug is about record corruption due to removing a subfield $9 when that is the only subfield in the field. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org