Bug 22785: Allow option to choose which record match is applied during import
authorNick Clemens <nick@bywatersolutions.com>
Mon, 31 Aug 2020 17:01:24 +0000 (17:01 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Tue, 3 May 2022 21:19:50 +0000 (11:19 -1000)
commit48ae97e361672431c743ba5a64097da6db87229e
tree84a9ef1d2e1f785cccecd1c933ae0efd669e311b
parent2aeedd42d40a29a99fad520531c8717e3fa61ee5
Bug 22785: Allow option to choose which record match is applied during import

This patchset adds the display of all matches found during import to the import management screen

A staff member with the permission to manage batches will be able to select for any individual record which match, or none, should be used during import

To test:
1 - Import a batch of records or export existing records from your catalog
2 - Import the file (again) and select a matching rule that will find matches
3 - Note that you now have radio buttons allowing you to select a record, or none
4 - Test scenarios:
    I - When 'Action if matching record found' is 'Ignore'
        a - Imported record ignored if match is selected
        b - 'Action if no match found' followed if no match is selected (Ignore matches)
    II - When 'Action if matching record found' is 'Replace'
        a - The chosen record is the one overlayed (you can edit the chosen record before importing to confirm)
        b - 'Action if no match found' followed if no match is selected (Ignore matches)
    III - When 'Action if matching record found' is 'Add incoming record'
        a - Record is added regardless of matches
5 - Confirm 'Diff' 'View' links work as expected
6 - Confirm that after records are imported the radio buttons to choose are disabled

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Bug 22785: API files

Signed-off-by: Ben Daeuber <bdaeuber@cityoffargo.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
16 files changed:
C4/ImportBatch.pm
Koha/REST/V1/ImportRecordMatches.pm [new file with mode: 0644]
api/v1/swagger/definitions/import_record_match.json [new file with mode: 0644]
api/v1/swagger/definitions/import_record_match.yaml [new file with mode: 0644]
api/v1/swagger/parameters/import_record_match.json [new file with mode: 0644]
api/v1/swagger/parameters/import_record_match.yaml [new file with mode: 0644]
api/v1/swagger/paths/import_record_matches.json [new file with mode: 0644]
api/v1/swagger/paths/import_record_matches.yaml [new file with mode: 0644]
api/v1/swagger/swagger.yaml
installer/data/mysql/atomicupdate/bug_22785.pl [new file with mode: 0755]
installer/data/mysql/kohastructure.sql
koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt
t/db_dependent/ImportBatch.t
t/db_dependent/Koha/Import/Record/Matches.t
t/db_dependent/api/v1/import_record_matches.t [new file with mode: 0755]
tools/batch_records_ajax.pl