Bug 12803 - Add ability to skip closed libraries when generating the holds queue
authorKyle M Hall <kyle@bywatersolutions.com>
Thu, 21 Aug 2014 15:22:30 +0000 (11:22 -0400)
committerBrendan A Gallagher <brendan@bywatersolutions.com>
Thu, 3 Mar 2016 20:19:00 +0000 (20:19 +0000)
commit3c9d50d13457941d2569720f94399250c17e1884
tree0a32a074f34abd5ee7012cb055865a82adc9207e
parent9bd9476b1d7c7b20c046213fd40910e0181b3757
 Bug 12803 - Add ability to skip closed libraries when generating the holds queue

The holds queue is typically generated many times a day in order to
select items to fill holds. Often these items are to be sent to a
different library. However, if the library whose item is picked to fill
a hold is closed, that hold will remain unfilled even if there are other
open libraries who own that item. It would be helpful if we could skip
closed libraries for the purpose of selecting items to fill holds.

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Create a record with two items on it, one at Branch A, and one at
   Branch B
4) Place a hold for pickup at Branch C
5) Generate the holds queue
6) Note which branch's item is selected for the hold
7) Enable the new system preference HoldsQueueSkipClosed
8) Add today as a holiday for that branch noted in step 6
9) Regenerate the holds queue
10) View the holds queue, notice the item selected is not from
    the closed branch!
11) prove t/db_dependent/HoldsQueue.t

Signed-off by: Jason Robb <jrobb@sekls.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
C4/HoldsQueue.pm
installer/data/mysql/atomicupdate/bug_12803.sql [new file with mode: 0644]
installer/data/mysql/sysprefs.sql
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref
t/db_dependent/HoldsQueue.t