[Koha-patches] [PATCH] kohabug 2017: ensure MARC21 $9 are in correct bib editor tab
Galen Charlton
galen.charlton at liblime.com
Mon May 12 23:59:35 CEST 2008
Update MARC21 bib framework to ensure that subfield $9 in 110,
110, 111, 130, 240, 243, 440, 410, 411, and 440 remain
in same bib editing tab as rest of subfields in those fields.
This helps ensure that authority-controlled fields are not
mangled when editing a bib record.
Change also fixes editing tab for subfields in the 037, 584, and
760.
This is DB rev 084.
---
installer/data/mysql/updatedatabase.pl | 14 ++++++++++++++
kohaversion.pl | 2 +-
2 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl
index e6a23c4..b7a876a 100755
--- a/installer/data/mysql/updatedatabase.pl
+++ b/installer/data/mysql/updatedatabase.pl
@@ -1556,6 +1556,20 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
SetVersion ($DBversion);
}
+$DBversion = "3.00.00.084";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+ if (C4::Context->preference("marcflavour") eq 'MARC21') {
+ $dbh->do("UPDATE marc_subfield_structure SET tab = 0 WHERE tab = 9 AND tagfield = '037'");
+ $dbh->do("UPDATE marc_subfield_structure SET tab = 1 WHERE tab = 6 AND tagfield in ('100', '110', '111', '130')");
+ $dbh->do("UPDATE marc_subfield_structure SET tab = 2 WHERE tab = 6 AND tagfield in ('240', '243')");
+ $dbh->do("UPDATE marc_subfield_structure SET tab = 4 WHERE tab = 6 AND tagfield in ('400', '410', '411', '440')");
+ $dbh->do("UPDATE marc_subfield_structure SET tab = 5 WHERE tab = 9 AND tagfield = '584'");
+ $dbh->do("UPDATE marc_subfield_structure SET tab = 7 WHERE tab = -6 AND tagfield = '760'");
+ }
+ print "Upgrade to $DBversion done (move editing tab of various MARC21 subfields)\n";
+ SetVersion ($DBversion);
+}
+
=item DropAllForeignKeys($table)
Drop all foreign keys of the table $table
diff --git a/kohaversion.pl b/kohaversion.pl
index 8b3e02d..f1e6135 100644
--- a/kohaversion.pl
+++ b/kohaversion.pl
@@ -10,7 +10,7 @@
use strict;
sub kohaversion {
- our $VERSION = "3.00.00.083";
+ our $VERSION = "3.00.00.084";
# version needs to be set this way
# so that it can be picked up by Makefile.PL
# during install
--
1.5.5.rc0.16.g02b00
More information about the Koha-patches
mailing list