Bugzilla – Attachment 180226 Details for
Bug 39462
(bug 37870 follow-up) Default values from framework are inserted into existing record while editing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39462: (bug 37870 follow-up) Default values from framework are inserted into existing record while editing
Bug-39462-bug-37870-follow-up-Default-values-from-.patch (text/plain), 2.16 KB, created by
Martin Renvoize (ashimema)
on 2025-04-01 16:59:26 UTC
(
hide
)
Description:
Bug 39462: (bug 37870 follow-up) Default values from framework are inserted into existing record while editing
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-04-01 16:59:26 UTC
Size:
2.16 KB
patch
obsolete
>From 706cb2eec80f88e466d4c114a206b00e98c9b60a Mon Sep 17 00:00:00 2001 >From: Janusz Kaczmarek <januszop@gmail.com> >Date: Wed, 26 Mar 2025 17:33:37 +0000 >Subject: [PATCH] Bug 39462: (bug 37870 follow-up) Default values from > framework are inserted into existing record while editing >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Due to changes made by the commit 0472b56a671, when editing an >existing bibliographic record a default value is inserted while it >should not, according to ApplyFrameworkDefaults systempreference. > >Test plan: >========== >1. Verify that ApplyFrameworkDefaults systempreference is set to > âwhen cataloguing new records onlyâ. >2. Take any existing bibliographic record, e.g. sn:1. Open it in > standard editor and identify a non used (empty) subfield, e.g. 024 $a. > Note the framework (Books, Booklets, Workbooks). Close the editor > (Cancel). >3. Modify the framework in question (Books, Booklets, Workbooks) by > setting a default value for the chosen subfield (e.g. 024 $a). >4. Open the record in the editor again. Note that the 024 $a subfield > has now an inserted default value while it should not, according to > the ApplyFrameworkDefaults setting. Do not save the record, chose > Cancel. >5. Apply the patch ; restart_all. >6. Repeat p. 4 -- there should be no default value inserted in the > existing record now. > >Sponsored-by: Pontificia Università di San Tommaso d'Aquino (Angelicum) >Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> >Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> >--- > Koha/UI/Form/Builder/Biblio.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/Koha/UI/Form/Builder/Biblio.pm b/Koha/UI/Form/Builder/Biblio.pm >index ffd0397653b..3f6cd56769d 100644 >--- a/Koha/UI/Form/Builder/Biblio.pm >+++ b/Koha/UI/Form/Builder/Biblio.pm >@@ -51,7 +51,7 @@ sub new { > > my $self = {}; > >- if ( exists $self->{biblionumber} ) { >+ if ( exists $params->{biblionumber} ) { > $self->{biblionumber} = $params->{biblionumber} =~ s/\D//gr; > > # just in case biblionumber obtained from CGI and passed directly here contains weird characters like spaces >-- >2.49.0
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 39462
:
179742
|
179743
|
179744
|
179745
| 180226 |
180227