Bugzilla – Attachment 58926 Details for
Bug 17196
Move marcxml out of the biblioitems table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17196: Update switch_marc21_series_info.pl
Bug-17196-Update-switchmarc21seriesinfopl.patch (text/plain), 3.81 KB, created by
Marcel de Rooy
on 2017-01-13 09:41:06 UTC
(
hide
)
Description:
Bug 17196: Update switch_marc21_series_info.pl
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2017-01-13 09:41:06 UTC
Size:
3.81 KB
patch
obsolete
>From b7e0cf44a7f70da2a0c75d6f5781dca2bfe5dd2f Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 25 Aug 2016 15:18:12 +0100 >Subject: [PATCH] Bug 17196: Update switch_marc21_series_info.pl >Content-Type: text/plain; charset=utf-8 > >Not sure if this script is still used, could someone confirm? > >Test plan: >If you know how to test it, please do > >Signed-off-by: Mason James <mtj@kohaaloha.com> > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >Signed-off-by: Zeno Tajoli <z.tajoli@cineca.it> > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > misc/migration_tools/switch_marc21_series_info.pl | 38 ++++++++++++++++++++--- > 1 file changed, 33 insertions(+), 5 deletions(-) > >diff --git a/misc/migration_tools/switch_marc21_series_info.pl b/misc/migration_tools/switch_marc21_series_info.pl >index 8f0c7f6..a51f830 100755 >--- a/misc/migration_tools/switch_marc21_series_info.pl >+++ b/misc/migration_tools/switch_marc21_series_info.pl >@@ -58,16 +58,44 @@ if ( ! $result || $show_help ) { > > my $dbh = C4::Context->dbh; > >-my $count_sth = $dbh->prepare( 'SELECT COUNT(biblionumber) FROM biblio CROSS JOIN biblioitems USING (biblionumber) WHERE ExtractValue(marcxml,\'//datafield[@tag="440"]/subfield[@code="a"]\') OR ExtractValue(marcxml,\'//datafield[@tag="440"]/subfield[@code="v"]\') OR ExtractValue(marcxml,\'//datafield[@tag="440"]/subfield[@code="n"]\') OR ExtractValue(marcxml,\'//datafield[@tag="490"]/subfield[@code="a"]\') OR ExtractValue(marcxml,\'//datafield[@tag="490"]/subfield[@code="v"]\')' ); >- >-my $bibs_sth = $dbh->prepare( 'SELECT biblionumber FROM biblio CROSS JOIN biblioitems USING (biblionumber) WHERE ExtractValue(marcxml,\'//datafield[@tag="440"]/subfield[@code="a"]\') OR ExtractValue(marcxml,\'//datafield[@tag="440"]/subfield[@code="v"]\') OR ExtractValue(marcxml,\'//datafield[@tag="440"]/subfield[@code="n"]\') OR ExtractValue(marcxml,\'//datafield[@tag="490"]/subfield[@code="a"]\') OR ExtractValue(marcxml,\'//datafield[@tag="490"]/subfield[@code="v"]\')' ); >+my $count_sth = $dbh->prepare( >+ q| >+ SELECT COUNT(biblionumber) >+ FROM biblio_metadata >+ WHERE format='marcxml' >+ AND marcflavour=? >+ AND ( >+ ExtractValue(metadata,'//datafield[@tag="440"]/subfield[@code="a"]') >+ OR ExtractValue(metadata,'//datafield[@tag="440"]/subfield[@code="v"]') >+ OR ExtractValue(metadata,'//datafield[@tag="440"]/subfield[@code="n"]') >+ OR ExtractValue(metadata,'//datafield[@tag="490"]/subfield[@code="a"]') >+ OR ExtractValue(metadata,'//datafield[@tag="490"]/subfield[@code="v"]') >+ ) >+ | >+); >+ >+my $bibs_sth = $dbh->prepare( >+ q| >+ SELECT biblionumber >+ FROM biblio_metadata >+ WHERE format='marcxml' >+ AND marcflavour=? >+ AND ( >+ ExtractValue(metadata,'//datafield[@tag="440"]/subfield[@code="a"]') >+ OR ExtractValue(metadata,'//datafield[@tag="440"]/subfield[@code="v"]') >+ OR ExtractValue(metadata,'//datafield[@tag="440"]/subfield[@code="n"]') >+ OR ExtractValue(metadata,'//datafield[@tag="490"]/subfield[@code="a"]') >+ OR ExtractValue(metadata,'//datafield[@tag="490"]/subfield[@code="v"]') >+ ) >+ | >+); > > unless ( $commit ) { > print_usage(); > } > > print "Examining MARC records...\n"; >-$count_sth->execute(); >+$count_sth->execute( C4::Context->preference('marcflavour') ); > my ( $num_records ) = $count_sth->fetchrow; > > unless ( $commit ) { >@@ -105,7 +133,7 @@ my %fields = ( > }, > ); > >-$bibs_sth->execute(); >+$bibs_sth->execute( C4::Context->preference('marcflavour') ); > while ( my ( $biblionumber ) = $bibs_sth->fetchrow ) { > my $framework = GetFrameworkCode( $biblionumber ) || ''; > my ( @newfields ); >-- >2.1.4
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 17196
:
54910
|
54911
|
54912
|
54913
|
54914
|
54918
|
55856
|
55857
|
55858
|
55859
|
55860
|
55904
|
55905
|
55906
|
55907
|
55908
|
55921
|
55922
|
55950
|
55951
|
56038
|
57835
|
57836
|
57837
|
57838
|
57839
|
57840
|
57841
|
57842
|
58000
|
58007
|
58008
|
58023
|
58024
|
58025
|
58026
|
58027
|
58028
|
58029
|
58030
|
58031
|
58032
|
58037
|
58038
|
58039
|
58040
|
58041
|
58042
|
58043
|
58044
|
58045
|
58046
|
58047
|
58048
|
58504
|
58505
|
58506
|
58507
|
58508
|
58509
|
58510
|
58511
|
58512
|
58513
|
58514
|
58516
|
58517
|
58923
|
58924
|
58925
| 58926 |
58927
|
58928
|
58929
|
58930
|
58931
|
58932
|
58933
|
58934
|
58935
|
58936
|
58937
|
58938
|
58939
|
58943
|
58946
|
58947