Bugzilla – Attachment 104627 Details for
Bug 22470
Missing the table name on misc/migration_tools/switch_marc21_series_info.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22470: Missing the table name on misc/migration_tools/switch_marc21_series_info.pl
Bug-22470-Missing-the-table-name-on-miscmigrationt.patch (text/plain), 1.92 KB, created by
David Roberts
on 2020-05-09 16:09:48 UTC
(
hide
)
Description:
Bug 22470: Missing the table name on misc/migration_tools/switch_marc21_series_info.pl
Filename:
MIME Type:
Creator:
David Roberts
Created:
2020-05-09 16:09:48 UTC
Size:
1.92 KB
patch
obsolete
>From 8ffe4f33dca063c79b31b4a1fb41fc3113e5d053 Mon Sep 17 00:00:00 2001 >From: David Roberts <david@koha-ptfs.co.uk> >Date: Sat, 9 May 2020 16:07:03 +0000 >Subject: [PATCH] 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. >--- > misc/migration_tools/switch_marc21_series_info.pl | 12 ++++++++---- > 1 file changed, 8 insertions(+), 4 deletions(-) > >diff --git a/misc/migration_tools/switch_marc21_series_info.pl b/misc/migration_tools/switch_marc21_series_info.pl >index 0bad3f2a54..925be0c8b3 100755 >--- a/misc/migration_tools/switch_marc21_series_info.pl >+++ b/misc/migration_tools/switch_marc21_series_info.pl >@@ -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'" > ); > } > >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 22470
:
104627
|
104981
|
105191