Bugzilla – Attachment 88439 Details for
Bug 11529
Add subtitle, medium and part fields to biblio table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11529: Update kohafield in default framework only if not already set.
Bug-11529-Update-kohafield-in-default-framework-on.patch (text/plain), 3.80 KB, created by
Ere Maijala
on 2019-04-23 08:45:08 UTC
(
hide
)
Description:
Bug 11529: Update kohafield in default framework only if not already set.
Filename:
MIME Type:
Creator:
Ere Maijala
Created:
2019-04-23 08:45:08 UTC
Size:
3.80 KB
patch
obsolete
>From e4c3a20d770b1911c2e7348a92a11fa70e2f5d0d Mon Sep 17 00:00:00 2001 >From: Ere Maijala <ere.maijala@helsinki.fi> >Date: Fri, 12 Apr 2019 16:59:39 +0300 >Subject: [PATCH] Bug 11529: Update kohafield in default framework only if not > already set. > >--- > .../data/mysql/atomicupdate/bug_11529.perl | 40 +++++++++++++++---- > 1 file changed, 32 insertions(+), 8 deletions(-) > >diff --git a/installer/data/mysql/atomicupdate/bug_11529.perl b/installer/data/mysql/atomicupdate/bug_11529.perl >index c67d85f2b7..6e784491c3 100644 >--- a/installer/data/mysql/atomicupdate/bug_11529.perl >+++ b/installer/data/mysql/atomicupdate/bug_11529.perl >@@ -17,15 +17,39 @@ if( CheckVersion( $DBversion ) ) { > my $marcflavour = C4::Context->preference('marcflavour'); > > if ( $marcflavour eq 'UNIMARC' ) { >- $dbh->do( "UPDATE marc_subfield_structure SET kohafield='biblio.medium' WHERE frameworkcode='' AND tagfield='200' AND tagsubfield='b'" ); >- $dbh->do( "UPDATE marc_subfield_structure SET kohafield='biblio.subtitle' WHERE frameworkcode='' AND tagfield='200' AND tagsubfield='e'" ); >- $dbh->do( "UPDATE marc_subfield_structure SET kohafield='biblio.part_number' WHERE frameworkcode='' AND tagfield='200' AND tagsubfield='h'" ); >- $dbh->do( "UPDATE marc_subfield_structure SET kohafield='biblio.part_name' WHERE frameworkcode='' AND tagfield='200' AND tagsubfield='i'" ); >+ $dbh->do(qq{ >+ UPDATE marc_subfield_structure SET kohafield='biblio.medium' >+ WHERE (kohafield IS NULL OR kohafield='') AND frameworkcode='' AND tagfield='200' AND tagsubfield='b' >+ }); >+ $dbh->do(qq{ >+ UPDATE marc_subfield_structure SET kohafield='biblio.subtitle' >+ WHERE (kohafield IS NULL OR kohafield='') AND frameworkcode='' AND tagfield='200' AND tagsubfield='e' >+ }); >+ $dbh->do(qq{ >+ UPDATE marc_subfield_structure SET kohafield='biblio.part_number' >+ WHERE (kohafield IS NULL OR kohafield='') AND frameworkcode='' AND tagfield='200' AND tagsubfield='h' >+ }); >+ $dbh->do(qq{ >+ UPDATE marc_subfield_structure SET kohafield='biblio.part_name' >+ WHERE (kohafield IS NULL OR kohafield='') AND frameworkcode='' AND tagfield='200' AND tagsubfield='i' >+ }); > } else { >- $dbh->do( "UPDATE marc_subfield_structure SET kohafield='biblio.medium' WHERE frameworkcode='' AND tagfield='245' AND tagsubfield='h'" ); >- $dbh->do( "UPDATE marc_subfield_structure SET kohafield='biblio.subtitle' WHERE frameworkcode='' AND tagfield='245' AND tagsubfield='b'" ); >- $dbh->do( "UPDATE marc_subfield_structure SET kohafield='biblio.part_number' WHERE frameworkcode='' AND tagfield='245' AND tagsubfield='n'" ); >- $dbh->do( "UPDATE marc_subfield_structure SET kohafield='biblio.part_name' WHERE frameworkcode='' AND tagfield='245' AND tagsubfield='p'" ); >+ $dbh->do(qq{ >+ UPDATE marc_subfield_structure SET kohafield='biblio.medium' >+ WHERE (kohafield IS NULL OR kohafield='') AND frameworkcode='' AND tagfield='245' AND tagsubfield='h' >+ }); >+ $dbh->do(qq{ >+ UPDATE marc_subfield_structure SET kohafield='biblio.subtitle' >+ WHERE (kohafield IS NULL OR kohafield='') AND frameworkcode='' AND tagfield='245' AND tagsubfield='b' >+ }); >+ $dbh->do(qq{ >+ UPDATE marc_subfield_structure SET kohafield='biblio.part_number' >+ WHERE (kohafield IS NULL OR kohafield='') AND frameworkcode='' AND tagfield='245' AND tagsubfield='n' >+ }); >+ $dbh->do(qq{ >+ UPDATE marc_subfield_structure SET kohafield='biblio.part_name' >+ WHERE (kohafield IS NULL OR kohafield='') AND frameworkcode='' AND tagfield='245' AND tagsubfield='p' >+ }); > } > > $dbh->do( "DROP TABLE IF EXISTS fieldmapping" ); >-- >2.17.1
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 11529
:
81930
|
81931
|
82024
|
82025
|
82026
|
82027
|
82028
|
82029
|
82088
|
82089
|
82090
|
82428
|
82429
|
82430
|
82431
|
82538
|
82539
|
82540
|
82541
|
82542
|
83103
|
83104
|
83105
|
83106
|
83107
|
83108
|
83961
|
83962
|
83963
|
83964
|
83965
|
83966
|
85587
|
85588
|
85589
|
85590
|
85591
|
85592
|
86677
|
86678
|
86679
|
86680
|
86681
|
86682
|
87248
|
87249
|
87250
|
87251
|
87252
|
87253
|
87256
|
87257
|
87258
|
87259
|
87260
|
87261
|
87911
|
87912
|
87913
|
87914
|
87915
|
87916
|
87917
|
87918
|
87919
|
88247
|
88248
|
88249
|
88250
|
88251
|
88252
|
88253
|
88254
|
88255
|
88256
|
88406
|
88407
|
88408
|
88409
|
88410
|
88411
|
88412
|
88413
|
88414
|
88415
|
88416
|
88433
|
88434
|
88435
|
88436
|
88437
|
88438
|
88439
|
88440
|
88441
|
88442
|
88443
|
88762
|
88763
|
88764
|
88765
|
88766
|
88767
|
88768
|
88769
|
88770
|
88771
|
88772
|
88851
|
88852
|
88853
|
88854
|
88855
|
88856
|
88857
|
88858
|
88859
|
88860
|
88861
|
88862
|
89096
|
89097
|
89098
|
89099
|
89100
|
89101
|
89102
|
89103
|
89104
|
89105
|
89106
|
89107
|
89234
|
89235
|
89236
|
89237
|
89238
|
89239
|
89240
|
89241
|
89242
|
89243
|
89244
|
89245
|
89246
|
91680
|
91681
|
91682
|
91683
|
91684
|
91685
|
91686
|
91687
|
91688
|
91689
|
91690
|
91691
|
91692
|
91824
|
91825
|
91826
|
91827
|
91828
|
91829
|
91830
|
91831
|
91832
|
91833
|
91834
|
91835
|
91836
|
91837
|
92016
|
92019
|
92020
|
105667
|
105672