Koha/misc
Nick Clemens d7f4a93008
Bug 33418: Add overlay_framework option to connexion scripts
This patch adds the option to specify a framework to be used when overlaying records from webservices/connexion

To test:
1 - vim /etc/koha/sites/kohadev/connexion.cnf
2 - Set content:
    host:
    port: 8888
    koha:http://localhost:8081
    log:/var/log/koha/kohadev/connexion.log
    match:ISBN
    user:kohauser
    password:kohapass
    overlay_action:replace
    nomatch_action:create_new
    item_action:always_add
    import_mode:direct
    framework:BKS
    overlay_framework:
    debug:1
3 - Save the sample file from this bug into your kohaclone (or copy and paste into a file your koha test site can reach)
4 - On the command line:
    perl misc/bin/connexion_import_daemon.pl -c /etc/koha/sites/kohadev/connexion.cnf
5 - In another terminal:
    cat bug_33418.test  | nc -v localhost 8888
6 - It should report success and a biblionumber
7 - In Koha: Cataloguing->Manage staged MARC record
8 - View the most recent batch with file name (webservice)
9 - Confirm it was imported, no match
10 - Click 'View' under the 'Record' column
11 - Confirm record loads correctly and 'MARC framework' detail is 'Books, Booklets, Workbooks'
12 - On the terminal repeat the command:
    cat bug_33418.test  | nc -v localhost 8888
13 - It should succed
14 - View the new batch, confirm the record matched this time
15 - View the record details, confirm framework is now 'default'
16 - On the first terminal hit Ctrl+C to stop the daemon
16 - Edit connexion.cnf and change:
    import_mode:stage
    framework:ACQ
    overlay_framework:IR
17 - Restart daemon:
     perl misc/bin/connexion_import_daemon.pl -c /etc/koha/sites/kohadev/connexion.cnf
18 - Delete the record created above
19 - On the second terminal repeat the command:
    cat bug_33418.test  | nc -v localhost 8888
20 - Confirm the batch is created, but not imported
21 - In terminal:
     perl misc/cronjobs/import_webservice_batch.pl --framework=ACQ --overlay_framework=BKS
22 - Confirm batch imported, and record in ACQ framework
23 - In terminal:
     cat bug_33418.test  | nc -v localhost 8888
     perl misc/cronjobs/import_webservice_batch.pl --framework=ACQ --overlay_framework=BKS
24 - Confirm batch added, record matched, record imported, and record now in Books framework
25 - Stop the deamon, edit connexion.cnf:
     import_mode:direct
26 - Start the daemon, and on other terminal repeat:
     cat bug_33418.test  | nc -v localhost 8888
27 - Confirm record in Binders framework
28 - Set record framework to Books
29 - Stop daemon, edit cnf and remove 'overlay_framework' setting
30 - Start daemon and cat the file again
31 - Confirm the record remains in Books framework

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-05-10 16:45:50 +02:00
..
admin Bug 31325: Fix koha-preferences get 2022-08-16 09:11:40 -03:00
bin Bug 33418: Add overlay_framework option to connexion scripts 2024-05-10 16:45:50 +02:00
cronjobs Bug 33418: Add overlay_framework option to connexion scripts 2024-05-10 16:45:50 +02:00
devel Bug 36309: Make create_superlibrarian.pl output more useful 2024-04-22 08:57:35 +02:00
interface_customization
maintenance Bug 36709: Add confirm flag to update_localuse_from_statistics.pl script 2024-05-07 15:53:44 +02:00
migration_tools Bug 36700: Update svc to use CSRF-TOKEN 2024-05-01 13:40:19 +01:00
release_notes Add release notes for 23.11.0 2023-11-30 16:17:58 -03:00
search_tools Bug 35345: Add --where option to rebuild_elasticsearch.pl 2024-04-22 12:39:26 +02:00
translator Bug 36516: Fix useless warning from translation script 2024-04-05 11:51:19 +02:00
workers Bug 33898: Implement reaping for database polling 2024-03-15 09:38:37 +01:00
add_date_fields_to_marc_records.pl Bug 23924: Reset the fields to add 2023-05-05 12:13:53 -03:00
add_statistics_borrowers_categorycode.pl Bug 34478: op =~ ^cud- in pl/pm 2024-03-01 10:56:11 +01:00
batchCompareMARCvsFrameworks.pl
batchdeletebiblios.pl
batchDeleteUnusedSubfields.pl
batchImportMARCWithBiblionumbers.pl
batchRebuildBiblioTables.pl
batchRebuildItemsTables.pl Bug 29697: Use flag embed_items 2022-07-22 15:24:11 -03:00
batchRepairMissingBiblionumbers.pl Bug 29697: Replace GetMarcBiblio occurrences with $biblio->metadata->record 2022-07-22 15:24:11 -03:00
check_sysprefs.pl
commit_file.pl Bug 15869: Change framework on overlay 2023-02-07 10:32:22 -03:00
export_borrowers.pl Bug 28327: Unify CSV delimiter special behavior for tabulation 2022-08-19 15:53:12 -03:00
export_records.pl Bug 31286: Embed see-from headings into bibliographic records export 2024-03-25 09:53:24 +01:00
exportauth.pl
import_patrons.pl Bug 34621: Tidy import_patrons.pl 2024-04-12 14:02:43 +02:00
koha-install-log
link_bibs_to_authorities.pl Bug 30024: Make link_bibs_to_authorities.pl rely on LinkerRelink 2023-11-03 14:22:45 -03:00
load_yaml.pl
mod_zebraqueue.pl
process_ill_updates.pl Bug 35581: Koha::Illrequest -> Koha::ILL::Request 2024-04-22 08:57:45 +02:00
recreateIssueStatistics.pl Bug 34478: op =~ ^cud- in pl/pm - Manual revert changes to recreateIssueStatistics.pl 2024-03-01 10:57:15 +01:00
sax_parser_print.pl
sax_parser_test.pl
sip_cli_emulator.pl Bug 34478: op =~ ^cud- in pl/pm - Manual revert changes to sip_cli_emulator.pl 2024-03-01 10:57:14 +01:00
stage_file.pl
z3950_responder.pl