Koha/svc
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
..
cataloguing Bug 31682: Silence automatic linker warn 2022-10-11 10:41:23 -03:00
club Bug 36418: Set header response content type to application/json - svc 2024-04-02 17:59:04 +02:00
config Bug 36084: svc - config/systempreferences 2024-03-01 11:00:46 +01:00
letters Bug 32496: Reduce unnecessary unblessings of objects in Circulation.pm 2023-09-22 10:52:39 -03:00
mana Bug 36418: Catch more cases where header response should be application/json 2024-04-02 17:59:04 +02:00
members Bug 36084: svc - members/add_to_list 2024-03-01 11:00:55 +01:00
records Bug 32631: Error when previewing record during batch record modification 2023-01-27 16:16:43 -03:00
virtualshelves Bug 34913: Adjust C4::Utils::DataTables::VirtualShelves 2024-01-26 15:13:42 +01:00
article_request Bug 36418: Set header response content type to application/json - svc 2024-04-02 17:59:04 +02:00
authentication Bug 36700: Update svc to use CSRF-TOKEN 2024-05-01 13:40:19 +01:00
authorised_values Bug 28785: Adjust check_cookie_auth calls 2021-10-18 11:28:41 +02:00
barcode Bug 34732: (QA follow-up): tidy up code 2023-09-19 16:34:23 -03:00
bib Bug 35181: Don't pass undef to header 2023-11-06 08:42:46 -03:00
bib_framework Bug 28750: fix svc/bib_framework 2021-07-26 16:28:52 +02:00
bib_profile Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
checkin Bug 36418: Explicitly set response to json 2024-04-02 17:59:03 +02:00
checkout_notes Bug 36084: svc - checkout_notes 2024-03-01 11:00:49 +01:00
checkouts Bug 36418: Set header response content type to application/json - svc 2024-04-02 17:59:04 +02:00
convert_report Bug 34478: Add 'op' to reports/guided_reports - WIP 2024-03-01 10:58:53 +01:00
cover_images Bug 36084: svc - cover_images 2024-03-01 11:00:52 +01:00
creator_batches Bug 36084: svc - creator_batches 2024-03-01 11:00:53 +01:00
holds Bug 36418: Set header response content type to application/json - svc 2024-04-02 17:59:04 +02:00
import_bib Bug 33418: Add overlay_framework option to connexion scripts 2024-05-10 16:45:50 +02:00
localization
new_bib Bug 29697: Replace some missing occurrences 2022-07-25 09:30:30 -03:00
problem_reports Bug 36084: svc - problem_reports 2024-03-01 11:00:56 +01:00
recall Bug 36418: Catch more cases where header response should be application/json 2024-04-02 17:59:04 +02:00
renew Bug 36418: Explicitly set response to json 2024-04-02 17:59:03 +02:00
report Bug 26669: (QA follow-up) Update last run when report run by name 2022-04-04 16:23:46 +02:00
return_claims Bug 36418: Set header response content type to application/json - svc 2024-04-02 17:59:04 +02:00
split_callnumbers Bug 26251: Remove unused routines from svc/split_callnumbers 2020-08-20 10:23:56 +02:00