Bugzilla – Attachment 179016 Details for
Bug 26869
Enable batch record modification to create 952/item on existing bibs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26869: Use the default framework
Bug-26869-Use-the-default-framework.patch (text/plain), 2.10 KB, created by
Martin Renvoize (ashimema)
on 2025-03-06 13:30:26 UTC
(
hide
)
Description:
Bug 26869: Use the default framework
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-03-06 13:30:26 UTC
Size:
2.10 KB
patch
obsolete
>From 0d81696d775b80702d0f78ac1821797fbffc8ea8 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 6 Mar 2025 13:27:47 +0000 >Subject: [PATCH] Bug 26869: Use the default framework > >The unit tests highlighted that without passing an frameworkcode to the >MarcSubfieldStructures->find call we throw errors as we can't identify >the correct subfield structure rules to apply. > >This patch adds the default frameworkcode, empty string, to the lookup. > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > Koha/BackgroundJob/BatchUpdateBiblio.pm | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > >diff --git a/Koha/BackgroundJob/BatchUpdateBiblio.pm b/Koha/BackgroundJob/BatchUpdateBiblio.pm >index f46565afa84..d33bec61207 100644 >--- a/Koha/BackgroundJob/BatchUpdateBiblio.pm >+++ b/Koha/BackgroundJob/BatchUpdateBiblio.pm >@@ -205,7 +205,8 @@ sub can_add_item_from_marc_record { > # Check that holdingbranch is set > my $holdingbranch_mss = Koha::MarcSubfieldStructures->find( > { >- kohafield => 'items.holdingbranch', >+ frameworkcode => '', >+ kohafield => 'items.holdingbranch', > } > ); > my @holdingbranch_exists = >@@ -215,7 +216,8 @@ sub can_add_item_from_marc_record { > # Check that homebranch is set > my $homebranch_mss = Koha::MarcSubfieldStructures->find( > { >- kohafield => 'items.homebranch', >+ frameworkcode => '', >+ kohafield => 'items.homebranch', > } > ); > my @homebranch_exists = >@@ -225,7 +227,8 @@ sub can_add_item_from_marc_record { > # Check that itemtype is set > my $item_mss = Koha::MarcSubfieldStructures->find( > { >- kohafield => C4::Context->preference('item-level_itypes') ? 'items.itype' : 'biblioitems.itemtype', >+ frameworkcode => '', >+ kohafield => C4::Context->preference('item-level_itypes') ? 'items.itype' : 'biblioitems.itemtype', > } > ); > my @itemtype_exists = grep { $_->subfield( $item_mss->tagsubfield ) } $record->field( $item_mss->tagfield ); >-- >2.48.1
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 26869
:
112687
|
162383
|
162387
|
162388
|
166541
|
167312
|
170305
|
170306
|
176397
|
176398
|
179013
|
179014
|
179015
| 179016