Bugzilla – Attachment 142955 Details for
Bug 24860
Add ability to place item group level holds
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24860: Add reserves.item_group_it
Bug-24860-Add-reservesitemgroupit.patch (text/plain), 6.41 KB, created by
Kyle M Hall (khall)
on 2022-11-02 13:13:28 UTC
(
hide
)
Description:
Bug 24860: Add reserves.item_group_it
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2022-11-02 13:13:28 UTC
Size:
6.41 KB
patch
obsolete
>From 30e2920c2c40d413e89c59f74bd6335f09e720ea Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 28 Feb 2020 10:37:05 -0500 >Subject: [PATCH] Bug 24860: Add reserves.item_group_it > >This feature builds upon bug 24857 and allows placing holds that target a specific item group of a record. It is patterned after the feature that allows limiting hold selection by itemtype ( AllowHoldItemTypeSelection ). > >Test Plan: >1) Apply bug 24857 and this bug's patches >2) Run updatedatabase.pl >3) Restart all the things! >4) Enable the sysprefs EnableVolumes and EnableVolumeHolds >5) Create a record, items and item groups, with each item being assigned to >an item group >6) Place a hold for a patron >7) Note the new selector to choose an item group in addition to record and item level holds >8) Place an item group level hold >9) Check in an item from the record that is not part of that item group >10) Note the hold is not trapped for that item >11) Check in an item from the record that *is* part of that item group >12) Note the hold is trapped for that item >13) Place an item group level hold for another item >14) Run the holds queue builder >15) Note the holds queue targets only items from that item group >16) Check out all the items of that item group to other patrosn >17) Re-run the holds queue builder >18) Note the holds queue no longer has a line for that hold, > as all items that could fill that hold are now unavailable > >Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> > >Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us> >--- > .../data/mysql/atomicupdate/bug_24860.perl | 21 +++++++++++++++++++ > installer/data/mysql/kohastructure.sql | 4 ++++ > 2 files changed, 25 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/bug_24860.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_24860.perl b/installer/data/mysql/atomicupdate/bug_24860.perl >new file mode 100644 >index 0000000000..5e7c72bc3d >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_24860.perl >@@ -0,0 +1,21 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if ( CheckVersion( $DBversion ) ) { >+ unless ( column_exists( 'reserves', 'item_group_id' ) ) { >+ $dbh->do(q{ >+ ALTER TABLE reserves >+ ADD COLUMN `item_group_id` int(11) NULL default NULL AFTER biblionumber, >+ ADD CONSTRAINT `reserves_ibfk_ig` FOREIGN KEY (`item_group_id`) REFERENCES `item_groups` (`item_group_id`) ON DELETE SET NULL ON UPDATE CASCADE; >+ }); >+ } >+ >+ unless ( column_exists( 'old_reserves', 'item_group_id' ) ) { >+ $dbh->do(q{ >+ ALTER TABLE old_reserves >+ ADD COLUMN `item_group_id` int(11) NULL default NULL AFTER biblionumber, >+ ADD CONSTRAINT `old_reserves_ibfk_ig` FOREIGN KEY (`item_group_id`) REFERENCES `item_groups` (`item_group_id`) ON DELETE SET NULL ON UPDATE SET NULL; >+ }); >+ } >+ >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (Bug 24860 - Add ability to place item group level holds)\n"; >+} >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index e88c75f5d4..4fa9db4705 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -4101,6 +4101,7 @@ CREATE TABLE `old_reserves` ( > `borrowernumber` int(11) DEFAULT NULL COMMENT 'foreign key from the borrowers table defining which patron this hold is for', > `reservedate` date DEFAULT NULL COMMENT 'the date the hold was places', > `biblionumber` int(11) DEFAULT NULL COMMENT 'foreign key from the biblio table defining which bib record this hold is on', >+ `item_group_id` int(11) NULL default NULL COMMENT 'foreign key from the item_groups table defining if this is an item group level hold', > `branchcode` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'foreign key from the branches table defining which branch the patron wishes to pick this hold up at', > `desk_id` int(11) DEFAULT NULL COMMENT 'foreign key from the desks table defining which desk the patron should pick this hold up at', > `notificationdate` date DEFAULT NULL COMMENT 'currently unused', >@@ -4127,6 +4128,7 @@ CREATE TABLE `old_reserves` ( > KEY `old_reserves_itemnumber` (`itemnumber`), > KEY `old_reserves_branchcode` (`branchcode`), > KEY `old_reserves_itemtype` (`itemtype`), >+ CONSTRAINT `old_reserves_ibfk_ig` FOREIGN KEY (`item_group_id`) REFERENCES `item_groups` (`item_group_id`) ON DELETE SET NULL ON UPDATE SET NULL, > CONSTRAINT `old_reserves_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE SET NULL, > CONSTRAINT `old_reserves_ibfk_2` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE SET NULL ON UPDATE SET NULL, > CONSTRAINT `old_reserves_ibfk_3` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE SET NULL ON UPDATE SET NULL, >@@ -4547,6 +4549,7 @@ CREATE TABLE `reserves` ( > `borrowernumber` int(11) NOT NULL DEFAULT 0 COMMENT 'foreign key from the borrowers table defining which patron this hold is for', > `reservedate` date DEFAULT NULL COMMENT 'the date the hold was placed', > `biblionumber` int(11) NOT NULL DEFAULT 0 COMMENT 'foreign key from the biblio table defining which bib record this hold is on', >+ `item_group_id` int(11) NULL default NULL COMMENT 'foreign key from the item_groups table defining if this is an item group level hold', > `branchcode` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'foreign key from the branches table defining which branch the patron wishes to pick this hold up at', > `desk_id` int(11) DEFAULT NULL COMMENT 'foreign key from the desks table defining which desk the patron should pick this hold up at', > `notificationdate` date DEFAULT NULL COMMENT 'currently unused', >@@ -4575,6 +4578,7 @@ CREATE TABLE `reserves` ( > KEY `branchcode` (`branchcode`), > KEY `desk_id` (`desk_id`), > KEY `itemtype` (`itemtype`), >+ CONSTRAINT `reserves_ibfk_ig` FOREIGN KEY (`item_group_id`) REFERENCES `item_groups` (`item_group_id`) ON DELETE CASCADE ON UPDATE CASCADE, > CONSTRAINT `reserves_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE, > CONSTRAINT `reserves_ibfk_2` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE, > CONSTRAINT `reserves_ibfk_3` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE, >-- >2.30.2
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 24860
:
100644
|
100645
|
100646
|
100647
|
100648
|
100649
|
100650
|
100651
|
101744
|
101745
|
101746
|
101747
|
101748
|
101749
|
101750
|
101751
|
101827
|
101828
|
101829
|
101830
|
101831
|
101832
|
101833
|
101834
|
101835
|
102230
|
102231
|
102232
|
102233
|
102234
|
102235
|
102236
|
102237
|
102238
|
102239
|
102240
|
102241
|
102242
|
102243
|
102244
|
102245
|
102246
|
102247
|
106589
|
106590
|
106591
|
106592
|
106593
|
106594
|
106595
|
106596
|
106597
|
106682
|
106683
|
106684
|
106685
|
106686
|
106687
|
106688
|
106689
|
106690
|
106742
|
106743
|
106744
|
106745
|
106746
|
106747
|
106748
|
106749
|
106750
|
108458
|
108459
|
108460
|
108461
|
108462
|
108463
|
108464
|
108465
|
108466
|
109097
|
109098
|
109099
|
109100
|
109101
|
109102
|
109103
|
109104
|
109105
|
109171
|
109172
|
109173
|
109174
|
109175
|
109176
|
109177
|
109178
|
109179
|
113616
|
113617
|
113618
|
113619
|
113620
|
113621
|
113622
|
113623
|
113624
|
135922
|
135923
|
135924
|
135925
|
135926
|
135927
|
135928
|
135929
|
135930
|
138221
|
138222
|
138224
|
138225
|
138226
|
138227
|
138228
|
138229
|
138230
|
141214
|
141215
|
141735
|
141736
|
141737
|
141738
|
141739
|
141740
|
141741
|
141742
|
141743
|
141744
|
141745
|
141746
|
141747
|
141748
|
141749
|
141750
|
142413
|
142414
|
142415
|
142416
|
142417
|
142418
|
142419
|
142420
|
142421
|
142422
|
142423
|
142424
|
142425
|
142426
|
142427
|
142428
|
142429
|
142430
|
142827
|
142955
|
142956
|
142957
|
142958
|
142959
|
142960
|
142961
|
142962
|
142963
|
142964
|
142965
|
142966
|
142967
|
142968
|
142969
|
142970
|
142971
|
142972
|
142973
|
142974
|
142975
|
142992
|
142993
|
142994
|
142995
|
142996
|
142997
|
142998
|
142999
|
143000
|
143001
|
143002
|
143003
|
143004
|
143005
|
143006
|
143007
|
143008
|
143009
|
143010
|
143011