$dbh->do(
"UPDATE marc_subfield_structure SET kohafield='biblio.seriestitle'
WHERE tagfield='490' AND tagsubfield='a'"
);
$dbh->do(
"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='biblio.seriestitle' AND tagfield='440' AND tagsubfield='a'"
);
$dbh->do(
"UPDATE marc_subfield_structure SET kohafield=''
WHERE kohafield='biblioitems.volume' AND tagfield='440' AND tagsubfield='v'"
);
lines 232-249
also add
$dbh->do(
"UPDATE marc_subfield_structure SET kohafield=''
WHERE kohafield='biblioitems.number' AND tagfield='440' AND tagsubfield='n'"
);
Changing back to default assignee. Created attachment 104627 [details] [review] 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. I'm not 100% sure I understand what this script is meant to do, but I've made the suggested edits and as far as I can see the script runs without errors and moves series data into the different fields. (In reply to David Roberts from comment #5) > I'm not 100% sure I understand what this script is meant to do, but I've > made the suggested edits and as far as I can see the script runs without > errors and moves series data into the different fields. As I understand it, this script was created in light of the changes in the MARC21 standard relating to field 440. According to the "FIELD DEFINITION AND SCOPE" section in https://www.loc.gov/marc/bibliographic/bd440.html, field 440 was made obsolete in 2008. Created attachment 104981 [details] [review] 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. Created attachment 105191 [details] [review] 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> Pushed to master for 20.11, thanks to everybody involved! backported to 20.05.x for 20.05.01 backported to 19.11.x for 19.11.07 Backported to 19.05.x branch for 19.05.13 |
UPDATE marc_subfield_structure SET kohafield='seriestitle' - it's missing the table name it should be $dbh->do( "UPDATE marc_subfield_structure SET kohafield='biblio.seriestitle' WHERE tagfield='490' AND tagsubfield='a'" ); $dbh->do( "UPDATE marc_subfield_structure SET kohafield='biblio.volume' WHERE tagfield='490' AND tagsubfield='v'" ); # empty old koha fields $dbh->do( "UPDATE marc_subfield_structure SET kohafield='' WHERE kohafield='biblio.seriestitle' AND tagfield='440' AND tagsubfield='a'" ); $dbh->do( "UPDATE marc_subfield_structure SET kohafield='' WHERE kohafield='biblio.volume' AND tagfield='440' AND tagsubfield='v'" ); lines 232-249