Bugzilla – Attachment 103314 Details for
Bug 17232
When creating a new framework from an old one, several fields are not copied (important, link, default value, max length, is URL)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17232: Make sure all fields are copies when creating a new framework from another
Bug-17232-Make-sure-all-fields-are-copies-when-cre.patch (text/plain), 3.46 KB, created by
Bernardo Gonzalez Kriegel
on 2020-04-20 19:27:37 UTC
(
hide
)
Description:
Bug 17232: Make sure all fields are copies when creating a new framework from another
Filename:
MIME Type:
Creator:
Bernardo Gonzalez Kriegel
Created:
2020-04-20 19:27:37 UTC
Size:
3.46 KB
patch
obsolete
>From 820a2425da65959a50312225d16a9664bf81b7b7 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer.83@web.de> >Date: Tue, 14 Apr 2020 10:45:01 +0000 >Subject: [PATCH] Bug 17232: Make sure all fields are copies when creating a > new framework from another > >Some digging revealed that when you create a new framework >and use an old framework as the base, some information would >not be copied to the new framework as they were missing from >the SQL command used here. > >- Tag: Important >- Subfield: > - Important > - Default value > - Max length > - Is a URL > - Link > >To test: >- Pick one of the existing frameworks and change the > fields listed above. Take note of what you changed. >- Create a new framework >- Go to "Marc structure" of the new framework >- You are offered the option to copy an existing framework >- Use your prepared framework >- Verify the fields weren't copied - your config was lost >- Apply patch >- Create another new framework >- Repeat the duplication and tests >- Verify that now all fields have been copied correctly > >Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >Good test plan, problem verified and fixed. Used ACQ fw >--- > admin/marctagstructure.pl | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > >diff --git a/admin/marctagstructure.pl b/admin/marctagstructure.pl >index b5d7004069..d6b7d14b88 100755 >--- a/admin/marctagstructure.pl >+++ b/admin/marctagstructure.pl >@@ -335,13 +335,13 @@ sub StringSearch { > # the sub used to duplicate a framework from an existing one in MARC parameters tables. > # > sub duplicate_framework { >- my ($newframeworkcode,$oldframeworkcode) = @_; >- my $dbh = C4::Context->dbh; >- $dbh->do(q|INSERT INTO marc_tag_structure (tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, ind1_defaultvalue, ind2_defaultvalue, frameworkcode) >- SELECT tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value, ind1_defaultvalue, ind2_defaultvalue, ? from marc_tag_structure where frameworkcode=?|, undef, $newframeworkcode, $oldframeworkcode ); >+ my ($newframeworkcode,$oldframeworkcode) = @_; >+ my $dbh = C4::Context->dbh; >+ $dbh->do(q|INSERT INTO marc_tag_structure (tagfield, liblibrarian, libopac, repeatable, mandatory, important, authorised_value, ind1_defaultvalue, ind2_defaultvalue, frameworkcode) >+ SELECT tagfield,liblibrarian,libopac,repeatable,mandatory,important,authorised_value, ind1_defaultvalue, ind2_defaultvalue, ? from marc_tag_structure where frameworkcode=?|, undef, $newframeworkcode, $oldframeworkcode ); > >- $dbh->do(q|INSERT INTO marc_subfield_structure (frameworkcode,tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,seealso,hidden) >- SELECT ?,tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,seealso,hidden from marc_subfield_structure where frameworkcode=? >+ $dbh->do(q|INSERT INTO marc_subfield_structure (frameworkcode,tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,important,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,seealso,hidden,link,defaultvalue,maxlength) >+ SELECT ?,tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,important,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,seealso,hidden,link,defaultvalue,maxlength from marc_subfield_structure where frameworkcode=? > |, undef, $newframeworkcode, $oldframeworkcode ); > } > >-- >2.17.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 17232
:
103207
|
103314
|
103746