Bugzilla – Attachment 52082 Details for
Bug 9701
Configure default indicators
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
With this second patch, bug 9701 is entirely fixed. The default values are also loaded in the cataloguing form. The database update is now done according to the database update workflow. Previous changes to files that ought not to have changed, done in th
With-this-second-patch-bug-9701-is-entirely-fixed-.patch (text/plain), 3.66 KB, created by
joachim.ganseman
on 2016-06-06 14:06:12 UTC
(
hide
)
Description:
With this second patch, bug 9701 is entirely fixed. The default values are also loaded in the cataloguing form. The database update is now done according to the database update workflow. Previous changes to files that ought not to have changed, done in th
Filename:
MIME Type:
Creator:
joachim.ganseman
Created:
2016-06-06 14:06:12 UTC
Size:
3.66 KB
patch
obsolete
>From 1510b0909360af4dcb702f93cea1aa4f575b8bce Mon Sep 17 00:00:00 2001 >From: Joachim Ganseman <joachim.ganseman@student.ua.ac.be> >Date: Mon, 6 Jun 2016 14:00:37 +0000 >Subject: [PATCH] With this second patch, bug 9701 is entirely fixed. The > default values are also loaded in the cataloguing form. The database update > is now done according to the database update workflow. Previous changes to > files that ought not to have changed, done in the previous partial patch, > have been undone in this patch.. > >Test: Define default values in some MARC framework. Go to cataloguing >and create a new record using this framework. Verify that the defined >defaults are visible when set. Verify the default is empty (as before) > if no default was set. Verify that if the default is changed, the > record is saved with the manually changed value. Verify that upon > changing such a new record, the manually set indicator value is used > and not the default one from the framework. >--- > cataloguing/addbiblio.pl | 4 ++-- > .../mysql/atomicupdate/bug_9701-add_default_indicators.sql | 3 +++ > installer/data/mysql/updatedatabase.pl | 12 ------------ > 3 files changed, 5 insertions(+), 14 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_9701-add_default_indicators.sql > >diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl >index f0263ef..6c65b93 100755 >--- a/cataloguing/addbiblio.pl >+++ b/cataloguing/addbiblio.pl >@@ -662,8 +662,8 @@ sub build_tabs { > tag_lib => $tagslib->{$tag}->{lib}, > repeatable => $tagslib->{$tag}->{repeatable}, > mandatory => $tagslib->{$tag}->{mandatory}, >- indicator1 => $indicator1, >- indicator2 => $indicator2, >+ indicator1 => ( $indicator1 || $tagslib->{$tag}->{ind1_defaultvalue} ), #if not set, try to load the default value >+ indicator2 => ( $indicator2 || $tagslib->{$tag}->{ind2_defaultvalue} ), #use short-circuit operator for efficiency > subfield_loop => \@subfields_data, > tagfirstsubfield => $subfields_data[0], > fixedfield => $tag < 10?1:0, >diff --git a/installer/data/mysql/atomicupdate/bug_9701-add_default_indicators.sql b/installer/data/mysql/atomicupdate/bug_9701-add_default_indicators.sql >new file mode 100644 >index 0000000..289883c >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_9701-add_default_indicators.sql >@@ -0,0 +1,3 @@ >+ALTER TABLE marc_tag_structure >+ADD COLUMN ind2_defaultvalue VARCHAR(1) NOT NULL DEFAULT '' AFTER authorized_value, >+ADD COLUMN ind1_defaultvalue VARCHAR(1) NOT NULL DEFAULT '' AFTER authorized_value; >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index f96692c..657ba4e 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -12614,18 +12614,6 @@ if ( CheckVersion($DBversion) ) { > SetVersion($DBversion); > } > >-$DBversion = "16.06.00.002"; >-if (CheckVersion($DBversion) ) { >- $dbh->do(q{ >- ALTER TABLE marc_tag_structure ADD COLUMN ind2_defaultvalue VARCHAR(1) NOT NULL DEFAULT '' AFTER authorized_value; >- }); >- $dbh->do(q{ >- ALTER TABLE marc_tag_structure ADD COLUMN ind1_defaultvalue VARCHAR(1) NOT NULL DEFAULT '' AFTER authorized_value; >- }); >- print "Upgrade to $DBversion done (Bug 9701 - Configure default indicator)" >- SetVersion($DBversion) >-} >- > > # DEVELOPER PROCESS, search for anything to execute in the db_update directory > # SEE bug 13068 >-- >2.1.4
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 9701
:
52054
|
52082
|
52161
|
52171
|
52172
|
52173
|
53403
|
53404
|
71929
|
71930
|
71931
|
72010
|
72011
|
72012
|
72986
|
73780
|
73781
|
73782
|
73783
|
73843
|
73844
|
73845