Bugzilla – Attachment 126981 Details for
Bug 29146
Default values from the framework should only be applied at biblio/item creation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29146: Same for item editor
Bug-29146-Same-for-item-editor.patch (text/plain), 1.23 KB, created by
Marcel de Rooy
on 2021-10-27 12:09:06 UTC
(
hide
)
Description:
Bug 29146: Same for item editor
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2021-10-27 12:09:06 UTC
Size:
1.23 KB
patch
obsolete
>From d410571b6d02c3b63fee5a259a1715129e7127ca Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Wed, 27 Oct 2021 12:07:03 +0000 >Subject: [PATCH] Bug 29146: Same for item editor >Content-Type: text/plain; charset=utf-8 > >Test plan: >Put some defaultvalue in an item subfield. >Test adding new item; is defaultvalue supplied already? >Test adding existing item. Clear the subfield. Save. Open again. >Is the subfield still empty now? > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > 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 d223b51daf..fee71f69b4 100644 >--- a/Koha/UI/Form/Builder/Item.pm >+++ b/Koha/UI/Form/Builder/Item.pm >@@ -118,7 +118,7 @@ sub generate_subfield_form { > $subfield->{kohafield} || 'items.more_subfields_xml'; > > if ( $prefill_with_default_values && ( !defined($value) || $value eq '' ) ) { >- $value = $subfield->{defaultvalue}; >+ $value = $subfield->{defaultvalue} if !$item->{itemnumber}; # apply defaultvalue only to new items > if ($value) { > > # get today date & replace <<YYYY>>, <<YY>>, <<MM>>, <<DD>> if provided in the default value >-- >2.20.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 29146
:
125541
|
126981
|
126985
|
126988
|
127041
|
127042
|
127043
|
127578
|
127579
|
127580