Bugzilla – Attachment 124083 Details for
Bug 28895
Don't fill in items.location with NewItemsDefaultLocation if blank
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28895: Don't use NewItemsDefaultLocation for items edition
Bug-28895-Dont-use-NewItemsDefaultLocation-for-ite.patch (text/plain), 993 bytes, created by
Jonathan Druart
on 2021-08-25 10:28:00 UTC
(
hide
)
Description:
Bug 28895: Don't use NewItemsDefaultLocation for items edition
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-08-25 10:28:00 UTC
Size:
993 bytes
patch
obsolete
>From cbf9220dfef0adfc5190ef5cf734600cd7d3ed2a Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 25 Aug 2021 12:27:12 +0200 >Subject: [PATCH] Bug 28895: Don't use NewItemsDefaultLocation for items > edition > >--- > cataloguing/additem.pl | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > >diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl >index e0992152562..d29ed79ffbd 100755 >--- a/cataloguing/additem.pl >+++ b/cataloguing/additem.pl >@@ -164,7 +164,10 @@ sub generate_subfield_form { > } > > my $default_location = C4::Context->preference('NewItemsDefaultLocation'); >- if ( !$value && $subfieldlib->{kohafield} eq 'items.location' && $default_location ) { >+ if ( !$item # $item is defined only on item creation >+ && ! $value >+ && $subfieldlib->{kohafield} eq 'items.location' >+ && $default_location ) { > $value = $default_location; > } > >-- >2.25.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 28895
: 124083