Bugzilla – Attachment 31980 Details for
Bug 13023
Nonpublic note for items should be mapped to a database column like itemnotes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13023 - Nonpublic note for items should be mapped to a database column like itemnotes
Bug-13023---Nonpublic-note-for-items-should-be-map.patch (text/plain), 3.37 KB, created by
Kyle M Hall (khall)
on 2014-10-02 14:58:51 UTC
(
hide
)
Description:
Bug 13023 - Nonpublic note for items should be mapped to a database column like itemnotes
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2014-10-02 14:58:51 UTC
Size:
3.37 KB
patch
obsolete
>From c45236b91120ec7551b70d8c5b5fb30dffe27bae Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 2 Oct 2014 10:11:32 -0400 >Subject: [PATCH] Bug 13023 - Nonpublic note for items should be mapped to a database column like itemnotes > >An item's public notes are mapped to a db column, but the librarian only >notes are not. We need to map these so in the future we may display them >in places other than the editor. > >Test Plan: >1) Create an item with a non-public note >2) Apply this patch >3) Run updatedatabase >4) Run misc/maintenance/touch_all_items.pl >5) Inspect the database, note that your non-public note is now in > items.itemnotes_nonpublic >--- > installer/data/mysql/kohastructure.sql | 2 ++ > installer/data/mysql/updatedatabase.pl | 7 +++++++ > 2 files changed, 9 insertions(+), 0 deletions(-) > >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index aeeba17..5db930e 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -904,6 +904,7 @@ CREATE TABLE `deleteditems` ( > `reserves` smallint(6) default NULL, -- number of times this item has been placed on hold/reserved > `restricted` tinyint(1) default NULL, -- authorized value defining use restrictions for this item (MARC21 952$5) > `itemnotes` mediumtext, -- public notes on this item (MARC21 952$x) >+ `itemnotes_nonpublic` mediumtext default NULL, > `holdingbranch` varchar(10) default NULL, -- foreign key from the branches table for the library that is currently in possession item (MARC21 952$b) > `paidfor` mediumtext, > `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- date and time this item was last altered >@@ -1202,6 +1203,7 @@ CREATE TABLE `items` ( -- holdings/item information > `reserves` smallint(6) default NULL, -- number of times this item has been placed on hold/reserved > `restricted` tinyint(1) default NULL, -- authorized value defining use restrictions for this item (MARC21 952$5) > `itemnotes` mediumtext, -- public notes on this item (MARC21 952$x) >+ `itemnotes_nonpublic` mediumtext default NULL, > `holdingbranch` varchar(10) default NULL, -- foreign key from the branches table for the library that is currently in possession item (MARC21 952$b) > `paidfor` mediumtext, > `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- date and time this item was last altered >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 6ea5911..efc4fbb 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -8781,6 +8781,13 @@ if ( CheckVersion($DBversion) ) { > SetVersion($DBversion); > } > >+$DBversion = '3.17.00.XXX'; >+if (C4::Context->preference("Version") < TransformToNum($DBversion)) { >+ $dbh->do("ALTER TABLE items ADD COLUMN itemnotes_nonpublic MEDIUMTEXT AFTER itemnotes"); >+ $dbh->do("ALTER TABLE deleteditems ADD COLUMN itemnotes_nonpublic MEDIUMTEXT AFTER itemnotes"); >+ print "Upgrade to $DBversion done (Bug 4222 - Nonpublic note not appearing in the staff client) <b>Please check each of your frameworks to ensure your non-public item notes are mapped to items.itemnotes_nonpublic. After doing so please have your administrator run misc/maintenance/touch_all_items.pl </b>)\n"; >+} >+ > =head1 FUNCTIONS > > =head2 TableExists($table) >-- >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 13023
:
31979
|
31980
|
32400
|
32401
|
32513
|
32663
|
33501
|
34361
|
34366
|
34416
|
34417
|
34418
|
34427
|
34428
|
35611
|
38428