Bug 22470: Missing the table name on misc/migration_tools/switch_marc21_series_info.pl
This patch adds the table name to the SQL update statements. To test: 1) Apply the patch 2) Run the script. Check that there are no errors, and that the script behaves as expected. Signed-off-by: Andreas Roussos <a.roussos@dataly.gr> Created a test record with values in field 440. Applied the patch, ran the script with the -c -f flags and observed that the values were moved to field 490. Also, the relevant Koha to MARC mappings were changed accordingly. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> (cherry picked from commit051b0b8d2f) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> (cherry picked from commit0ee5a38798) Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
This commit is contained in:
parent
b10e9ce6ab
commit
bcf40fe972
|
|
@ -231,22 +231,26 @@ if ( $update_frameworks ) {
|
|||
|
||||
# set new mappings for koha fields
|
||||
$dbh->do(
|
||||
"UPDATE marc_subfield_structure SET kohafield='seriestitle'
|
||||
"UPDATE marc_subfield_structure SET kohafield='biblio.seriestitle'
|
||||
WHERE tagfield='490' AND tagsubfield='a'"
|
||||
);
|
||||
$dbh->do(
|
||||
"UPDATE marc_subfield_structure SET kohafield='volume'
|
||||
"UPDATE marc_subfield_structure SET kohafield='biblioitems.volume'
|
||||
WHERE tagfield='490' AND tagsubfield='v'"
|
||||
);
|
||||
|
||||
# empty old koha fields
|
||||
$dbh->do(
|
||||
"UPDATE marc_subfield_structure SET kohafield=''
|
||||
WHERE kohafield='seriestitle' AND tagfield='440' AND tagsubfield='a'"
|
||||
WHERE kohafield='biblio.seriestitle' AND tagfield='440' AND tagsubfield='a'"
|
||||
);
|
||||
$dbh->do(
|
||||
"UPDATE marc_subfield_structure SET kohafield=''
|
||||
WHERE kohafield='volume' AND tagfield='440' AND tagsubfield='v'"
|
||||
WHERE kohafield='biblioitems.volume' AND tagfield='440' AND tagsubfield='v'"
|
||||
);
|
||||
$dbh->do(
|
||||
"UPDATE marc_subfield_structure SET kohafield=''
|
||||
WHERE kohafield='biblioitems.number' AND tagfield='440' AND tagsubfield='n'"
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue