Created attachment 99175 [details] [review] 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
Created attachment 99304 [details] [review] 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
Created attachment 99700 [details] [review] 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>
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.
Created attachment 111519 [details] [review] 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>
Created attachment 111520 [details] [review] Bug 24679: Return the correct id in AddModificationTemplate 'name' is not unique, and should not be used to retrieve the last inserted id
Created attachment 111521 [details] [review] Bug 24679: Fix exporter tests Use 998 instead of 999 which is used in MARC21 to store biblionumber
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.
Up
This could help to add more feature parity with other library systems...