Bugzilla – Attachment 185116 Details for
Bug 40594
Allow batch record modification to create multiple items on existing bibs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40594: Consider multiple items mapped in MMT
Bug-40594-Consider-multiple-items-mapped-in-MMT.patch (text/plain), 2.49 KB, created by
Pedro Amorim
on 2025-08-05 11:45:32 UTC
(
hide
)
Description:
Bug 40594: Consider multiple items mapped in MMT
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2025-08-05 11:45:32 UTC
Size:
2.49 KB
patch
obsolete
>From 1c8de201bc337d9ffca63834c4dd96bf879cc050 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@openfifth.co.uk> >Date: Tue, 5 Aug 2025 11:43:05 +0000 >Subject: [PATCH] Bug 40594: Consider multiple items mapped in MMT > >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) Add multiple items mapping, use the attached Marc Modification template sample as reference >4) Do a batch record modification, visit: ><staff_url>/cgi-bin/koha/tools/batch_record_modification.pl >5) Select the tab 'Enter a list of record numbers' and enter '79' >6) On the template, select the template previously created. Click 'continue' >7) Click 'Modify selected records'. Click 'View detail of the enqueued job'. Notice success message is shown with no errors >8) Check the biblio, visit: ><staff_url>/cgi-bin/koha/catalogue/detail.pl?biblionumber=79 >9) Notice it now has however how many new items you added to the mapping > >Additional testing notes from bug 26869: >test with 952 but with other subfields, without subfield '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 >--- > Koha/BackgroundJob/BatchUpdateBiblio.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/Koha/BackgroundJob/BatchUpdateBiblio.pm b/Koha/BackgroundJob/BatchUpdateBiblio.pm >index df6d53e7ade..a218abf4557 100644 >--- a/Koha/BackgroundJob/BatchUpdateBiblio.pm >+++ b/Koha/BackgroundJob/BatchUpdateBiblio.pm >@@ -93,7 +93,7 @@ RECORD_IDS: for my $biblionumber ( sort { $a <=> $b } @record_ids ) { > return $add_item_error_message unless $can_add_item; > > my $biblioitemnumber = $biblio->biblioitem->biblioitemnumber; >- C4::Items::AddItemFromMarc( $record, $biblionumber, { biblioitemnumber => $biblioitemnumber } ); >+ C4::Items::AddItemBatchFromMarc( $record, $biblionumber, $biblioitemnumber, '' ); > } > > C4::Biblio::ModBiblio( >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 40594
:
185115
| 185116