[Bug 12860] New: Tools > Data export : "Don't export fields" option doesn't work
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12860 Bug ID: 12860 Summary: Tools > Data export : "Don't export fields" option doesn't work Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Tools Assignee: gmcharlt@gmail.com Reporter: francois.charbonnier@inlibro.com QA Contact: testopia@bugs.koha-community.org I have just tested the data export tool on master. The option "Don't export fields" doesn't work for a field tag (ie 650) but works for a subfield tag (ie 650a). -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12860 Robin Sheat <robin@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |robin@catalyst.net.nz See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=13040 --- Comment #1 from Robin Sheat <robin@catalyst.net.nz> --- on Bug 13040 Comment 3 I do a bit of diagnosis of this, copy pasting the relevant bits here: Looking at the code, this can't work: if ( $f =~ m/^(\d{3})(.)?$/ ) { my ( $field, $subfield ) = ( $1, $2 ); # skip if this record doesn't have this field if ( defined $record->field($field) ) { if ( defined $subfield ) { my @tags = $record->field($field); foreach my $t (@tags) { $t->delete_subfields($subfield); } } else { $record->delete_fields($field); } } } where the 'delete_fields' line is the one causing the error. It can't take a tag like the regex pulls out, it must take a MARC::Field. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12860 Robin Sheat <robin@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - low |P3 Severity|enhancement |normal -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12860 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |10996 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12860 Jonathan Druart <jonathan.druart@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=12860 --- Comment #2 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 35610 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=35610&action=edit Bug 12860: the export tools explodes if a field is not exported To reproduce: 1/ Go on tools/export.pl 2/ Export some records and specify you don't want the fields 245 (the whole field, do not specify a subfield). 3/ Export, BOOM Software error: Arguments must be MARC::Field object at /home/koha/src/tools/export.pl line 400. Test plan: Apply the patch and confirm the fields 245 are not exported and the export works as expected. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12860 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@biblibre.co | |m Patch complexity|--- |Trivial patch Assignee|gmcharlt@gmail.com |jonathan.druart@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12860 Robin Sheat <robin@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12860 Robin Sheat <robin@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #35610|0 |1 is obsolete| | --- Comment #3 from Robin Sheat <robin@catalyst.net.nz> --- Created attachment 35614 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=35614&action=edit Bug 12860: the export tools explodes if a field is not exported To reproduce: 1/ Go on tools/export.pl 2/ Export some records and specify you don't want the fields 245 (the whole field, do not specify a subfield). 3/ Export, BOOM Software error: Arguments must be MARC::Field object at /home/koha/src/tools/export.pl line 400. Test plan: Apply the patch and confirm the fields 245 are not exported and the export works as expected. Signed-off-by: Robin Sheat <robin@catalyst.net.nz> Export fails to asplode with this patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12860 --- Comment #4 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to Robin Sheat from comment #3)
Created attachment 35614 [details] [review]
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Export fails to asplode with this patch
Hum? What happen with this patch? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12860 --- Comment #5 from Robin Sheat <robin@catalyst.net.nz> --- (In reply to Jonathan Druart from comment #4)
(In reply to Robin Sheat from comment #3)
Created attachment 35614 [details] [review] [review]
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Export fails to asplode with this patch
Hum? What happen with this patch?
Nothing, that's what I said :-) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12860 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=12860 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #35614|0 |1 is obsolete| | --- Comment #6 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 35619 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=35619&action=edit [PASSED QA] [PASSED QA] Bug 12860: the export tools explodes if a field is not exported To reproduce: 1/ Go on tools/export.pl 2/ Export some records and specify you don't want the fields 245 (the whole field, do not specify a subfield). 3/ Export, BOOM Software error: Arguments must be MARC::Field object at /home/koha/src/tools/export.pl line 400. Test plan: Apply the patch and confirm the fields 245 are not exported and the export works as expected. Signed-off-by: Robin Sheat <robin@catalyst.net.nz> Export fails to asplode with this patch Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> 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=12860 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Status|Passed QA |Pushed to Master --- Comment #7 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patch pushed to master. Thanks Jonathan! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12860 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz Status|Pushed to Master |Pushed to Stable --- Comment #8 from Chris Cormack <chris@bigballofwax.co.nz> --- Pushed to 3.18.x will be in 3.18.4 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12860 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_3_16_candidate CC| |mtj@kohaaloha.com --- Comment #9 from Mason James <mtj@kohaaloha.com> --- (In reply to Chris Cormack from comment #8)
Pushed to 3.18.x will be in 3.18.4
Pushed to 3.16.x, will be in 3.16.8 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12860 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_3_16_candidate | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org