Koha-clms/Koha/BackgroundJob
Pedro Amorim c225641cca
Bug 26869: Add items from MARC in BatchUpdateBiblio
Test plan, clean k-t-d:

Before test, pick a record and confirm it has no items, for this test we're using biblio 79:
<staff_url>/cgi-bin/koha/catalogue/detail.pl?biblionumber=79

1) Add a new MARC modification template, visit:
<staff_url>/cgi-bin/koha/tools/marc_modification_templates.pl
2) Click 'New template', enter a name and click 'Submit'
3) Click 'New action'
4) Pick 'Add new' and enter '952' as field and 'a' as subfield, enter 'CPL' as value
5) Click 'Add action'
6) Do a batch record modification, visit:
<staff_url>/cgi-bin/koha/tools/batch_record_modification.pl
7) Select the tab 'Enter a list of record numbers' and enter '79'
8) On the template, select the template previously created. Click 'continue'
9) Click 'Modify selected records'. Click 'View detail of the enqueued job'. Notice success message is shown with no errors
10) Check the biblio, visit:
<staff_url>/cgi-bin/koha/catalogue/detail.pl?biblionumber=79
11) Notice it now has an item with homebranch 'CPL'

test with 952 but with other subfields, without subfield 'a' -> confirm 'FK constraint' error is shown, no modification made
test with more than one occurrence of 952$a -> confirm 'FK constraint' error is shown, no modification made
test with 952$a too long e.g. 'aaaaaaaa' -> confirm 'too long' error is shown
test with no 952 mapping -> confirm things work as intended
test with 952 mapping plus other tags -> confirm things work as intended

prove koha/t/db_dependent/Koha/BackgroundJobs/BatchUpdateBiblio.t
prove koha/t/db_dependent/Koha/BackgroundJob/BatchUpdateBiblio.t

Signed-off by: Chris Rowlands <chris.rowlands6@nhs.net>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-03-17 11:59:48 +01:00
..
BatchCancelHold.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
BatchDeleteAuthority.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
BatchDeleteBiblio.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
BatchDeleteItem.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
BatchUpdateAuthority.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
BatchUpdateBiblio.pm Bug 26869: Add items from MARC in BatchUpdateBiblio 2025-03-17 11:59:48 +01:00
BatchUpdateBiblioHoldsQueue.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
BatchUpdateItem.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
CreateEHoldingsFromBiblios.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
ErmSushiHarvester.pm Bug 38782: Remove concat in background process 2024-12-27 15:19:07 +01:00
ImportKBARTFile.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
MARCImportCommitBatch.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
MARCImportRevertBatch.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
PseudonymizeStatistic.pm Bug 35277: (QA follow-up) POD corrections 2024-01-16 12:06:07 +01:00
StageMARCForImport.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
UpdateElasticIndex.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00