Bugzilla – Attachment 127579 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.30 KB, created by
Martin Renvoize (ashimema)
on 2021-11-12 11:18:58 UTC
(
hide
)
Description:
Bug 29146: Same for item editor
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-11-12 11:18:58 UTC
Size:
1.30 KB
patch
obsolete
>From 0bb608a67cc037aee2b20ebe78c8a7125e644030 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 > >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> >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > 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 64a0b92590..5efe6ed796 100644 >--- a/Koha/UI/Form/Builder/Item.pm >+++ b/Koha/UI/Form/Builder/Item.pm >@@ -119,7 +119,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