Koha/misc/cronjobs
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
..
holds Bug 32565: (follow-up) Tidy 2024-04-30 14:32:07 +02:00
recalls Bug 33992: Only consider the date when auto-expiring problematic recalls 2023-07-19 12:06:50 -03:00
rss
social_data
thirdparty Bug 34854: (follow-up) Param name change + POD 2024-01-17 11:39:05 +01:00
advance_notices.pl Bug 34059: Add only issues from the branch that is creating the notice 2023-08-15 11:25:39 +03:00
archive_purchase_suggestions.pl
automatic_checkin.pl Bug 31203: Alter other cronjobs that currenlty use cronlogaction 2022-10-05 16:12:59 -03:00
automatic_item_modification_by_age.pl Bug 31203: Alter other cronjobs that currenlty use cronlogaction 2022-10-05 16:12:59 -03:00
automatic_renewals.pl Bug 23296: Set patron branchcode when preparing non-digest version 2024-04-05 11:51:12 +02:00
backup.sh
batch_anonymise.pl Bug 31203: Alter other cronjobs that currenlty use cronlogaction 2022-10-05 16:12:59 -03:00
build_browser_and_cloud.pl Bug 31203: Alter other cronjobs that currenlty use cronlogaction 2022-10-05 16:12:59 -03:00
cart_to_shelf.pl Bug 31203: Alter other cronjobs that currenlty use cronlogaction 2022-10-05 16:12:59 -03:00
check-url-quick.pl Bug 29697: Replace GetMarcBiblio occurrences with $biblio->metadata->record 2022-07-22 15:24:11 -03:00
cleanup_database.pl Bug 36526: Remove circular dependency from Koha::Objects 2024-05-03 16:02:44 +02:00
cloud-kw.pl Bug 31203: Alter other cronjobs that currenlty use cronlogaction 2022-10-05 16:12:59 -03:00
cloud-sample.conf
CONFIGURE.gmail
create_koc_db.pl
crontab.example Bug 28688: Add renewal to crontab example 2023-10-10 09:22:31 -03:00
debar_patrons_with_fines.pl Bug 15157: (QA follow-up) Some more changes 2023-11-08 11:41:30 -03:00
delete_items.pl Bug 33698: Add fields to the verbose output that show the barcode and title of items that cannot be deleted 2023-06-09 08:50:14 -03:00
delete_patrons.pl Bug 15504: (QA follow-up) Final changes 2023-10-24 10:05:23 -03:00
delete_records_via_leader.pl Bug 32656: Script delete_records_via_leader.pl no longer deletes items 2023-01-20 13:53:09 +00:00
edi_cron.pl Bug 16258: (QA follow-up) Capitalise EDIFACT 2022-04-13 15:55:39 +02:00
erm_run_harvester.pl Bug 34587: (QA follow-up) Tidy 2023-10-31 16:46:32 -03:00
fines.pl Bug 18855: Don't create duplicate overdue fines if an issue is returned 2023-07-06 10:08:44 -03:00
gather_print_notices.pl Bug 35373: Remove false FIXME comment from gather_print_notices.pl 2024-01-26 15:14:07 +01:00
import_webservice_batch.pl Bug 33418: Add overlay_framework option to connexion scripts 2024-05-10 16:45:50 +02:00
longoverdue.pl Bug 35169: (QA follow-up) Fix spelling and preference name 2024-05-07 15:53:49 +02:00
membership_expiry.pl Bug 35001: Add some checks to membership_expiry 2023-10-24 15:44:32 -03:00
merge_authorities.pl
notice_unprocessed_suggestions.pl
overdue_notices.pl Bug 32740: Add a new option patron home library to OverdueNoticeFrom 2023-10-11 12:13:04 -03:00
patron_emailer.pl Bug 31203: Alter other cronjobs that currenlty use cronlogaction 2022-10-05 16:12:59 -03:00
plugins_nightly.pl Bug 35479: (QA follow-up): Tidy 2024-01-31 14:44:41 +01:00
printoverdues.sh
process_message_queue.pl Bug 31345: Add ability to exit process_message_queue.pl early if any plugin before_send_messages hook fails 2024-04-29 18:53:14 +02:00
purge_suggestions.pl Bug 31203: Alter other cronjobs that currenlty use cronlogaction 2022-10-05 16:12:59 -03:00
reconcile_balances.pl Bug 31203: Alter other cronjobs that currenlty use cronlogaction 2022-10-05 16:12:59 -03:00
remove_temporary_edifiles.pl
runreport.pl Bug 33050: Tidy 2023-11-08 11:41:14 -03:00
serialsUpdate.pl Bug 28950: Mark serial late when past grace period 2022-10-11 10:42:26 -03:00
share_usage_with_koha_community.pl Bug 31203: Alter other cronjobs that currenlty use cronlogaction 2022-10-05 16:12:59 -03:00
sitemap.pl Bug 33871: Use Koha object in Sitemapper, add optional filter 2023-09-01 11:23:25 -03:00
staticfines.pl Bug 36787: staticfines.pl add use Koha::DateUtils::output_pref 2024-05-07 17:41:20 +02:00
stockrotation.pl
update_patrons_category.pl Bug 31249: Use cronlogaction on update_patrons_category.pl 2022-08-05 11:53:15 -03:00
update_totalissues.pl Bug 36137: Make update_totalissues cron always skip the holds queue 2024-05-03 18:02:15 +02:00
writeoff_debts.pl Bug 35996: Make it clear that --category-code can not be used alone 2024-04-29 09:35:37 +02:00