[Bug 24679] New: Allow to apply a MARC modification template in export tool
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24679 Bug ID: 24679 Summary: Allow to apply a MARC modification template in export tool Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: ASSIGNED Severity: enhancement Priority: P5 - low Component: Tools Assignee: julian.maurice@biblibre.com Reporter: julian.maurice@biblibre.com QA Contact: testopia@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=24679 --- Comment #1 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 99175 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=99175&action=edit Bug 24679: Allow to apply a MARC modification template in export tool Test plan: 1. Create a MARC modification template with a simple action (for instance, "Add new field 999$9 with value foobar") 2. Go to Tools » Export data 3. Select some records (for instance, from biblionumber 1 to 10) 4. In options, select the MARC modification template you just created 5. Select File format 'MARC' 6. Click on 'Export bibliographic records' 7. Verify that exported records contain the 999$9 field 8. Repeat steps 3-7 with other export formats, and with authority records -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24679 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24679 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #99175|0 |1 is obsolete| | --- Comment #2 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 99304 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=99304&action=edit Bug 24679: Allow to apply a MARC modification template in export tool Test plan: 1. Create a MARC modification template with a simple action (for instance, "Add new field 999$9 with value foobar") 2. Go to Tools » Export data 3. Select some records (for instance, from biblionumber 1 to 10) 4. In options, select the MARC modification template you just created 5. Select File format 'MARC' 6. Click on 'Export bibliographic records' 7. Verify that exported records contain the 999$9 field 8. Repeat steps 3-7 with other export formats, and with authority records -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24679 Devinim <kohadevinim@devinim.com.tr> 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=24679 Devinim <kohadevinim@devinim.com.tr> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #99304|0 |1 is obsolete| | --- Comment #3 from Devinim <kohadevinim@devinim.com.tr> --- Created attachment 99700 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=99700&action=edit Bug 24679: Allow to apply a MARC modification template in export tool Test plan: 1. Create a MARC modification template with a simple action (for instance, "Add new field 999$9 with value foobar") 2. Go to Tools » Export data 3. Select some records (for instance, from biblionumber 1 to 10) 4. In options, select the MARC modification template you just created 5. Select File format 'MARC' 6. Click on 'Export bibliographic records' 7. Verify that exported records contain the 999$9 field 8. Repeat steps 3-7 with other export formats, and with authority records Good patch, succeeded. Signed-off-by: Devinim <kohadevinim@devinim.com.tr> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24679 Devinim <kohadevinim@devinim.com.tr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kohadevinim@devinim.com.tr -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24679 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Julian, tests are failing for me. # Failed test 'Export XML: marc modification template should have added 999$9' # at t/db_dependent/Exporter/Record.t line 483. # got: undef # expected: 'Foobar' # Looks like you failed 1 test of 2. # Failed test 'export xml with marc modification template' # at t/db_dependent/Exporter/Record.t line 484. # Failed test 'Export ISO2709: marc modification template should have added 999$9' # at t/db_dependent/Exporter/Record.t line 508. # got: undef # expected: 'Foobar' # Looks like you failed 1 test of 2. # Failed test 'export iso2709 with marc modification template' # at t/db_dependent/Exporter/Record.t line 509. # Looks like you failed 2 tests of 9. Certainly coming from bug 21708. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24679 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |25253 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25253 [Bug 25253] Allow to apply modification template when exporting checkouts -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24679 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #99700|0 |1 is obsolete| | --- Comment #5 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 111519 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111519&action=edit Bug 24679: Allow to apply a MARC modification template in export tool Test plan: 1. Create a MARC modification template with a simple action (for instance, "Add new field 999$9 with value foobar") 2. Go to Tools » Export data 3. Select some records (for instance, from biblionumber 1 to 10) 4. In options, select the MARC modification template you just created 5. Select File format 'MARC' 6. Click on 'Export bibliographic records' 7. Verify that exported records contain the 999$9 field 8. Repeat steps 3-7 with other export formats, and with authority records Signed-off-by: Devinim <kohadevinim@devinim.com.tr> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24679 --- Comment #6 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 111520 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111520&action=edit Bug 24679: Return the correct id in AddModificationTemplate 'name' is not unique, and should not be used to retrieve the last inserted id -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24679 --- Comment #7 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 111521 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111521&action=edit Bug 24679: Fix exporter tests Use 998 instead of 999 which is used in MARC21 to store biblionumber -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24679 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24679 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I am sorry, Julian, but tests are failing: # Failed test 'No tests run for subtest "export csv with marc modification template"' # at t/db_dependent/Exporter/Record.t line 441. DBI last_insert_id: invalid number of arguments: got handle + 3, expected handle + between 4 and 5 Usage: $h->last_insert_id($catalog, $schema, $table_name, $field_name [, \%attr ]) at /home/vagrant/kohaclone/C4/MarcModificationTemplates.pm line 110. # Looks like your test exited with 255 just after 7. t/db_dependent/Exporter/Record.t .. Dubious, test returned 255 (wstat 65280, 0xff00) Failed 3/9 subtests Test Summary Report ------------------- t/db_dependent/Exporter/Record.t (Wstat: 65280 Tests: 7 Failed: 1) Failed test: 7 Non-zero exit status: 255 Parse errors: Bad plan. You planned 9 tests but ran 7. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24679 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #9 from Fridolin Somers <fridolin.somers@biblibre.com> --- Up -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24679 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #10 from David Cook <dcook@prosentient.com.au> --- This could help to add more feature parity with other library systems... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24679 --- Comment #11 from Fridolin Somers <fridolin.somers@biblibre.com> --- up ;) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24679 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=30233 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24679 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24679 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #111519|0 |1 is obsolete| | --- Comment #12 from Aleisha Amohia <aleisha@catalyst.net.nz> --- Created attachment 186343 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186343&action=edit Bug 24679: Allow to apply a MARC modification template in export tool Test plan: 1. Create a MARC modification template with a simple action (for instance, "Add new field 999$9 with value foobar") 2. Go to Tools » Export data 3. Select some records (for instance, from biblionumber 1 to 10) 4. In options, select the MARC modification template you just created 5. Select File format 'MARC' 6. Click on 'Export bibliographic records' 7. Verify that exported records contain the 999$9 field 8. Repeat steps 3-7 with other export formats, and with authority records Signed-off-by: Devinim <kohadevinim@devinim.com.tr> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24679 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #111520|0 |1 is obsolete| | --- Comment #13 from Aleisha Amohia <aleisha@catalyst.net.nz> --- Created attachment 186344 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186344&action=edit Bug 24679: Return the correct id in AddModificationTemplate 'name' is not unique, and should not be used to retrieve the last inserted id -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24679 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #111521|0 |1 is obsolete| | --- Comment #14 from Aleisha Amohia <aleisha@catalyst.net.nz> --- Created attachment 186345 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186345&action=edit Bug 24679: Fix exporter tests Tidy, and use 998 instead of 999 which is used in MARC21 to store biblionumber -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24679 --- Comment #15 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- The only real problem is the failing QA checks for tidiness. So I will sign-off and fail QA for that after. Please reset back to sign-off if it's only the formatting changes :) 1) QA checks: Patches require tidying (blocker) testing 3 commit(s) (applied to 84227f7 'db8 Bug 41682: DBRev 25.12.00.014') Processing files [RUNNING] C4/MarcModificationTemplates.pm [RUNNING] C4/Record.pm [RUNNING] Koha/Exporter/Record.pm [RUNNING] koha-tmpl/intranet-tmpl/prog/en/modules/tools/export.tt [RUNNING] t/db_dependent/Exporter/Record.t [RUNNING] tools/export.pl [FAIL] C4/MarcModificationTemplates.pm [PASS] t/db_dependent/Exporter/Record.t [PASS] koha-tmpl/intranet-tmpl/prog/en/modules/tools/export.tt [FAIL] C4/Record.pm [FAIL] Koha/Exporter/Record.pm [FAIL] tools/export.pl Result: [FAIL] C4/MarcModificationTemplates.pm FAIL tidiness File is not tidy, please run `perl misc/devel/tidy.pl C4/MarcModificationTemplates.pm` [FAIL] C4/Record.pm FAIL tidiness File is not tidy, please run `perl misc/devel/tidy.pl C4/Record.pm` [FAIL] Koha/Exporter/Record.pm FAIL tidiness File is not tidy, please run `perl misc/devel/tidy.pl Koha/Exporter/Record.pm` [PASS] koha-tmpl/intranet-tmpl/prog/en/modules/tools/export.tt [PASS] t/db_dependent/Exporter/Record.t [FAIL] tools/export.pl FAIL tidiness File is not tidy, please run `perl misc/devel/tidy.pl tools/export.pl` Processing additional checks * Signed-off-by email 'Signed-off-by: Devinim <kohadevinim@devinim.com.tr>' seems invalid * Was this bug sponsored by anyone? Running tests (1) * Proving /kohadevbox/koha/t/db_dependent/Exporter/Record.t PASS 2) Code review (OK) a) CSV? This updates marc2csv etc. but the test plan includes no info about exporting a CSV format. As the option only appears after a CSV profile is added, I feel it should be inlcuded: - Add a CSV profile of type "Export records" - For example: Title=245|Test=999 - Export records using the CSV profile, verify MARC template is applied correctly 3) Testing Tested with authority and bibliographic records, .mrc, .xml and .csv. It worked well! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24679 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24679 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #186343|0 |1 is obsolete| | --- Comment #16 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 192051 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192051&action=edit Bug 24679: Allow to apply a MARC modification template in export tool Test plan: 1. Create a MARC modification template with a simple action (for instance, "Add new field 999$9 with value foobar") 2. Go to Tools » Export data 3. Select some records (for instance, from biblionumber 1 to 10) 4. In options, select the MARC modification template you just created 5. Select File format 'MARC' 6. Click on 'Export bibliographic records' 7. Verify that exported records contain the 999$9 field 8. Repeat steps 3-7 with other export formats, and with authority records Signed-off-by: Devinim <kohadevinim@devinim.com.tr> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24679 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #186344|0 |1 is obsolete| | --- Comment #17 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 192052 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192052&action=edit Bug 24679: Return the correct id in AddModificationTemplate 'name' is not unique, and should not be used to retrieve the last inserted id Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24679 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #186345|0 |1 is obsolete| | --- Comment #18 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 192053 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192053&action=edit Bug 24679: Fix exporter tests Tidy, and use 998 instead of 999 which is used in MARC21 to store biblionumber Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24679 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24679 --- Comment #19 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 192091 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192091&action=edit Bug 24679: Tidy Patch from commit c4c5179 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24679 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24679 Miranda Nero <mnero@oslri.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mnero@oslri.net -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org