@@ -, +, @@ 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.. 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 --- a/cataloguing/addbiblio.pl +++ a/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, --- a/installer/data/mysql/atomicupdate/bug_9701-add_default_indicators.sql +++ a/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; --- a/installer/data/mysql/updatedatabase.pl +++ a/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 --