Bugzilla – Attachment 10057 Details for
Bug 4222
Nonpublic note not appearing in the staff client
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 4222 followup: Do not update mappings unless we ought
Bug-4222-followup-Do-not-update-mappings-unless-we.patch (text/plain), 1.98 KB, created by
Jared Camins-Esakov
on 2012-06-10 02:06:03 UTC
(
hide
)
Description:
Bug 4222 followup: Do not update mappings unless we ought
Filename:
MIME Type:
Creator:
Jared Camins-Esakov
Created:
2012-06-10 02:06:03 UTC
Size:
1.98 KB
patch
obsolete
>From 6a91a0142a5bbcb6d539577eb6e7cf49e74a9234 Mon Sep 17 00:00:00 2001 >From: Jared Camins-Esakov <jcamins@cpbibliography.com> >Date: Sat, 9 Jun 2012 21:59:03 -0400 >Subject: [PATCH] Bug 4222 followup: Do not update mappings unless we ought >Content-Type: text/plain; charset="UTF-8" > >This follow-up modifies the database update for 4222 to only modify >mappings if the installation is not UNIMARC, and nothing else has >been mapped to the items.nonpublicnotes column (which did not exist >before the patch for bug 4222). >--- > installer/data/mysql/updatedatabase.pl | 9 ++++++++- > 1 files changed, 8 insertions(+), 1 deletions(-) > >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 0124e28..ab53a0b 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -5340,7 +5340,14 @@ $DBversion = '3.09.00.XXX'; > if (C4::Context->preference("Version") < TransformToNum($DBversion)) { > $dbh->do("ALTER TABLE items ADD COLUMN nonpublicnote MEDIUMTEXT AFTER itemnotes"); > $dbh->do("ALTER TABLE deleteditems ADD COLUMN nonpublicnote MEDIUMTEXT AFTER itemnotes"); >- $dbh->do("UPDATE marc_subfield_structure SET kohafield='items.nonpublicnote' WHERE (kohafield IS NULL OR kohafield = '') AND tagfield='952' AND tagsubfield='x'"); >+ unless ( C4::Context->preference("marcflavour") eq 'UNIMARC' ) { >+ $sth = $dbh->prepare("SELECT COUNT(*) FROM marc_subfield_structure WHERE kohafield='items.nonpublicnote'"); >+ $sth->execute; >+ my ($count) = $sth->fetchrow; >+ unless ( $count ) { >+ $dbh->do("UPDATE marc_subfield_structure SET kohafield='items.nonpublicnote' WHERE (kohafield IS NULL OR kohafield = '') AND tagfield='952' AND tagsubfield='x'"); >+ } >+ } > print "Upgrade to $DBversion done (Make nonpublicnote easier to use. <b>If you have mapped your items to a MARC field other than 952 (system default), please check your Koha to MARC mapping for items.nonpublicnote</b>)\n"; > } > >-- >1.7.2.5
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 4222
:
1918
|
2739
|
4350
|
4351
|
4746
|
4764
|
4765
|
4775
|
4832
|
4836
|
8048
|
10056
| 10057