Koha/misc
Alex Buckley 1a32355eb3
Bug 36770: Export records using a report
Enable the export_records.pl script use a report output to export biblios or authorities

Test plan:
1. Apply patches and restart services
2. Create a SQL report (id=1)
    SELECT biblionumber
    FROM biblio
3. Create a SQL report (id=2) and set an item as notforloan = -1
    SELECT title, author, biblio.biblionumber
    FROM biblio
    LEFT JOIN items USING (biblionumber)
    WHERE items.notforloan = <<Not for loan|NOT_LOAN>>
4. Create a SQL report (id=3)
    SELECT title, author
    FROM biblio
5. Create a SQL report (id=4)
    SELECT authid
    FROM auth_header
6. Run export_records.pl using report id=1 and confirm a koha.mrc file is created in the misc directory:
cd misc
./export_records.pl --report_id=1

7. Delete the koha.mrc file

8. Run export_records.pl using report id=2
./export_records.pl --report_id=2

9. Notice you are prompted to supply a parameter

10. Re-run report id=2 supplying a parameter. Confirm the koha.mrc file is created and contains bib data
./export_records.pl --report_id=2 --report_param=-1

11. Run export_records.pl using report id=3
./export_records.pl --report_id=3

12. Notice you get the message: The --report_id you specified does not fetch a biblionumber

13. Delete the koha.mrc file

14. Run export_records.pl using report id=4
./export_records.pl --report_id=4

15. Notice you get a message 'The --report_id you specified does not fetch a biblionumber'

16. Re-run export_records.pl setting the record-type=auths
./export_records.pl --record-type=auths --report_id=4

17. Notice the koha.mrc file is generated and contains auth data

Sponsored-by: Horowhenua Libraries, Toi Ohomai Institute of Technology, Plant and Food Research Limited, Waitaki District Council, South Taranaki District Council New Zealand

Signed-off-by: Alexandre Noel <alexandre.noel@inlibro.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-08-09 18:44:54 +02:00
..
admin
bin Bug 33418: Add overlay_framework option to connexion scripts 2024-05-10 16:45:50 +02:00
cronjobs Bug 37271: Recall status should be 'requested' in overdue_recalls.pl 2024-07-12 10:21:29 +02:00
devel
interface_customization
maintenance Bug 37181: Add --confirm option to pseudonymize_statistics.pl 2024-06-27 14:04:54 +02:00
migration_tools Bug 37553: Tidy to make QA tools happy 2024-08-02 18:59:59 +02:00
release_notes 24.05.00: Add release notes 2024-05-27 18:26:45 +02:00
search_tools
translator Bug 37303: Replace po2json with a JS version 2024-07-26 14:49:53 +01:00
workers Bug 36901: Add logging for uncaught exceptions in background job classes 2024-07-01 18:55:54 +02:00
add_date_fields_to_marc_records.pl
add_statistics_borrowers_categorycode.pl
batchCompareMARCvsFrameworks.pl
batchdeletebiblios.pl
batchDeleteUnusedSubfields.pl
batchImportMARCWithBiblionumbers.pl
batchRebuildBiblioTables.pl
batchRebuildItemsTables.pl
batchRepairMissingBiblionumbers.pl
check_sysprefs.pl
commit_file.pl
export_borrowers.pl
export_records.pl Bug 36770: Export records using a report 2024-08-09 18:44:54 +02:00
exportauth.pl
import_patrons.pl
koha-install-log
link_bibs_to_authorities.pl
load_yaml.pl
mod_zebraqueue.pl
process_ill_updates.pl
recreateIssueStatistics.pl
sax_parser_print.pl
sax_parser_test.pl
sip_cli_emulator.pl
stage_file.pl
z3950_responder.pl