Bug 7817: QA Follow-up: Print a warning when permanent location is mapped

Item field permanent location should not be mapped to the MARC structure.
If a library did so, this dbrev will print a warning.
If refers to report 12818 for help in moving the data to more_subfields_xml.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested by putting permanent_location in and out of the MARC structure.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
Marcel de Rooy 2014-08-25 13:24:03 +02:00 committed by Tomas Cohen Arazi
parent f6b770686f
commit b338a40e80
1 changed files with 14 additions and 0 deletions

View File

@ -8728,6 +8728,20 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
SetVersion ($DBversion);
}
$DBversion = '3.17.00.XXX';
if ( CheckVersion($DBversion) ) {
my @temp= $dbh->selectrow_array(qq|
SELECT count(*)
FROM marc_subfield_structure
WHERE kohafield='permanent_location' OR kohafield='items.permanent_location'
|);
print "Upgrade to $DBversion done (Bug 7817: Check for permanent_location)\n";
if( $temp[0] ) {
print "WARNING for Koha administrator: Your database contains one or more mappings for permanent_location to the MARC structure. This item field however is for internal use and should not be linked to a MARC (sub)field. Please correct it. See also Bugzilla reports 7817 and 12818.\n";
}
SetVersion($DBversion);
}
=head1 FUNCTIONS
=head2 TableExists($table)