Bugzilla – Attachment 153389 Details for
Bug 34266
Item type should not default to biblio itemtype if it's not a valid itemtype
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34266: Don't default to biblio itemtype if item-level_types is set
Bug-34266-Dont-default-to-biblio-itemtype-if-item-.patch (text/plain), 1.58 KB, created by
Julian Maurice
on 2023-07-13 07:28:56 UTC
(
hide
)
Description:
Bug 34266: Don't default to biblio itemtype if item-level_types is set
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2023-07-13 07:28:56 UTC
Size:
1.58 KB
patch
obsolete
>From 6591385f078cb38528be8cae3b13b16e702b1a03 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Thu, 13 Jul 2023 09:22:44 +0200 >Subject: [PATCH] Bug 34266: Don't default to biblio itemtype if > item-level_types is set > >biblioitems.itemtype and items.itype can use differents sets of values >so biblioitems.itemtype can be innappropriate as a default for >items.itype. >This patch removes this behaviour when item-level_itypes is set > >Test plan: >1. Disable item-level_itypes >2. Make sure that you have an item subfield linked to the authorised > value 'itemtypes' in your MARC framework >3. Create a biblio with an itemtype >4. Create a new item for this biblio. Notice that the biblio itemtype is > automatically selected for the 'itemtypes' subfield >5. Enable item-level_itypes >6. Create a new item for the same biblio. Now the 'itemtypes' subfield > should be empty. >--- > Koha/UI/Form/Builder/Item.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/Koha/UI/Form/Builder/Item.pm b/Koha/UI/Form/Builder/Item.pm >index 3a478ee05e..ce04b66c29 100644 >--- a/Koha/UI/Form/Builder/Item.pm >+++ b/Koha/UI/Form/Builder/Item.pm >@@ -220,7 +220,7 @@ sub generate_subfield_form { > $itemtype->translated_description; > } > >- if (!$value && $biblionumber) { >+ if (!$value && $biblionumber && !C4::Context->preference('item-level_itypes')) { > my $itype_sth = $dbh->prepare( > "SELECT itemtype FROM biblioitems WHERE biblionumber = ?"); > $itype_sth->execute($biblionumber); >-- >2.30.2
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 34266
:
153389
|
153390
|
153393
|
154485
|
154486
|
154487
|
154488
|
154489
|
154490
|
154491
|
154492
|
154630
|
154631
|
155072
|
155073