[Bug 12229] New: tools/export.pl fix to forbid adding of invalid records
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12229 Bug ID: 12229 Summary: tools/export.pl fix to forbid adding of invalid records Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Tools Assignee: gmcharlt@gmail.com Reporter: stephane.delaune@biblibre.com QA Contact: testopia@bugs.koha-community.org tools/export.pl it is able to add truncated or invalid records into the output iso2709 file, without error message. So if we want to read generated iso2709 file : script die -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12229 stephane.delaune@biblibre.com changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |stephane.delaune@biblibre.c | |om -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12229 stephane.delaune@biblibre.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |stephane.delaune@biblibre.c | |om --- Comment #1 from stephane.delaune@biblibre.com --- Created attachment 28180 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=28180&action=edit proposed patch : fix to prevent adding of invalid records in marc file Problem is : When a too big record is generated to be add into an iso2709 file, a warning "Record length of (too big integer here) is larger than the MARC spec allows (99999 bytes)" is displayed. in this case, it's only a warning so record is still generated (and added to the iso2709 file) with the first 5 characters of the leader defined to the maximum allow (99999). But this record is defective because the size defined in the leader (99999), no longer corresponds to the real record's datas. After, when the exported file is open with MARC::File::USMARC, these too big records generate errors. Solution is to verify record's length before to prevent adding it in the file if it's too big. nb : - xml export does not have this problem (too big record's are not added to the xml exported file), - this fix can't be apply when record is open, because it can become too big when adding too many items (addition that takes place in a second time) : so I applied fix only for marc exports, before adding in file. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12229 stephane.delaune@biblibre.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12229 stephane.delaune@biblibre.com changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |critical -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12229 stephane.delaune@biblibre.com changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - low |P3 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12229 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #28180|0 |1 is obsolete| | --- Comment #2 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 28410 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=28410&action=edit [SIGNED-oFF] Bug 12229: fix to prevent adding of invalid records in marc file Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Work as described. No errors Test: 1. Edit record, add 100.000 chars text to 500a 2. xml export produce the record, 3. mrc export do not produce the record, warning on log export.pl: record (number 2025) length 102668 is larger than the MARC spec allows (99999 bytes) at... -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12229 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |bgkriegel@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12229 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12229 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #28410|0 |1 is obsolete| | --- Comment #3 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 28456 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=28456&action=edit [PASSED QA] Bug 12229: fix to prevent adding of invalid records in marc file Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Work as described. No errors Test: 1. Edit record, add 100.000 chars text to 500a 2. xml export produce the record, 3. mrc export do not produce the record, warning on log export.pl: record (number 2025) length 102668 is larger than the MARC spec allows (99999 bytes) at... Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12229 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |gmcharlt@gmail.com --- Comment #4 from Galen Charlton <gmcharlt@gmail.com> --- Pushed to master and 3.16.x. Thanks, Stéphane! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12229 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12229 stephane.delaune@biblibre.com changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |13082 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12229 Fridolin SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolyn.somers@biblibre.co | |m --- Comment #5 from Fridolin SOMERS <fridolyn.somers@biblibre.com> --- Pushed to 3.14.x, will be in 3.14.12 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org