Bugzilla – Attachment 169466 Details for
Bug 19316
Items should have sort1 and sort2 fields
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19316: Add sort1 and sort2 to items and deleteditems tables
Bug-19316-Add-sort1-and-sort2-to-items-and-deleted.patch (text/plain), 3.90 KB, created by
Matt Blenkinsop
on 2024-07-24 10:19:50 UTC
(
hide
)
Description:
Bug 19316: Add sort1 and sort2 to items and deleteditems tables
Filename:
MIME Type:
Creator:
Matt Blenkinsop
Created:
2024-07-24 10:19:50 UTC
Size:
3.90 KB
patch
obsolete
>From 28b7877c7fcefcf83b35947e54b4aecdba1f3893 Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >Date: Wed, 30 Aug 2023 13:11:56 +0000 >Subject: [PATCH] Bug 19316: Add sort1 and sort2 to items and deleteditems > tables > >This patch adds to new fields to the items table to allow input for additional data into item records to help with sorting > >Sponsored-by: PTFS Europe >--- > .../bug_19316-addsort1-and-sort2-to-items.pl | 43 +++++++++++++++++++ > installer/data/mysql/kohastructure.sql | 4 ++ > 2 files changed, 47 insertions(+) > create mode 100755 installer/data/mysql/atomicupdate/bug_19316-addsort1-and-sort2-to-items.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_19316-addsort1-and-sort2-to-items.pl b/installer/data/mysql/atomicupdate/bug_19316-addsort1-and-sort2-to-items.pl >new file mode 100755 >index 00000000000..3716cf7f0f3 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_19316-addsort1-and-sort2-to-items.pl >@@ -0,0 +1,43 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "19316", >+ description => "Add sort1 and sort2 fields to items", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ >+ if ( !column_exists( 'items', 'sort1' ) ) { >+ $dbh->do( >+ q{ >+ ALTER TABLE `items` ADD COLUMN `sort1` varchar(50) default NULL AFTER `exclude_from_local_holds_priority` >+ } >+ ); >+ say $out "Added column 'items.sort1'"; >+ } >+ if ( !column_exists( 'items', 'sort2' ) ) { >+ $dbh->do( >+ q{ >+ ALTER TABLE `items` ADD COLUMN `sort2` varchar(50) default NULL AFTER `sort1` >+ } >+ ); >+ say $out "Added column 'items.sort2'"; >+ } >+ if ( !column_exists( 'deleteditems', 'sort1' ) ) { >+ $dbh->do( >+ q{ >+ ALTER TABLE `deleteditems` ADD COLUMN `sort1` varchar(50) default NULL AFTER `exclude_from_local_holds_priority` >+ } >+ ); >+ say $out "Added column 'deleteditems.sort1'"; >+ } >+ if ( !column_exists( 'deleteditems', 'sort2' ) ) { >+ $dbh->do( >+ q{ >+ ALTER TABLE `deleteditems` ADD COLUMN `sort2` varchar(50) default NULL AFTER `sort1` >+ } >+ ); >+ say $out "Added column 'deleteditems.sort2'"; >+ } >+ } >+}; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 8a6a1c26170..144188a2593 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -2797,6 +2797,8 @@ CREATE TABLE `deleteditems` ( > `stocknumber` varchar(32) DEFAULT NULL COMMENT 'inventory number (MARC21 952$i)', > `new_status` varchar(32) DEFAULT NULL COMMENT '''new'' value, you can put whatever free-text information. This field is intented to be managed by the automatic_item_modification_by_age cronjob.', > `exclude_from_local_holds_priority` tinyint(1) DEFAULT NULL COMMENT 'Exclude this item from local holds priority', >+ `sort1` varchar(50) default NULL, >+ `sort2` varchar(50) default NULL, > PRIMARY KEY (`itemnumber`), > KEY `delitembarcodeidx` (`barcode`), > KEY `delitemstocknumberidx` (`stocknumber`), >@@ -4055,6 +4057,8 @@ CREATE TABLE `items` ( > `stocknumber` varchar(32) DEFAULT NULL COMMENT 'inventory number (MARC21 952$i)', > `new_status` varchar(32) DEFAULT NULL COMMENT '''new'' value, you can put whatever free-text information. This field is intented to be managed by the automatic_item_modification_by_age cronjob.', > `exclude_from_local_holds_priority` tinyint(1) DEFAULT NULL COMMENT 'Exclude this item from local holds priority', >+ `sort1` varchar(50) default NULL, >+ `sort2` varchar(50) default NULL, > PRIMARY KEY (`itemnumber`), > UNIQUE KEY `itembarcodeidx` (`barcode`), > KEY `itemstocknumberidx` (`stocknumber`), >-- >2.39.3 (Apple Git-146)
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 19316
:
154963
|
154964
|
154965
|
154966
|
154967
|
166298
|
166299
|
166300
|
166301
|
166578
|
166593
|
169466
|
169467
|
169468
|
169469
|
169470
|
169503
|
169504
|
169505
|
169506
|
169507