Bug 19889: Make it possible to exclude items and categories from local holds priority
authorAgustin Moyano <agustinmoyano@theke.io>
Wed, 10 Jun 2020 19:18:01 +0000 (16:18 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 31 Aug 2020 14:17:58 +0000 (16:17 +0200)
commitbcf9b259c5fcc1a52772efc82d4c8eec24fcf3c9
tree43ed6a3fd97ed742e19d29f5770a94cb1b75f459
parent93fdca520943874143c783f68025c7a9d2d0fca3
Bug 19889: Make it possible to exclude items and categories from local holds priority

This patch adds the ability to exclude patrons (by category) from local
holds, and items, by editing the item itself or by batch item
modification tool.

To test:
1. apply patches
2. updatedatabase
3. Enable LocalHoldsPriority preference, and leave
   LocalHoldsPriorityPatronControl in pickup library, and
LocalHoldsPriorityItemControl in holding library.
4. Search for a biblio with one item.
5. Place a hold with a patron (patron1) and set pickup location to a different
   library of the item's home library
6. Place another hold with another patron (patron2) and set pickup location to be
   the same as the item's home library
7. ./misc/cronjobs/holds/build_holds_queue.pl
8. Go to circulation -> holds queue
9. Search by the item's home library
CHECK => only the hold for patron2 (with the pickup location the same as the
item's home library) appears in the table
10. Go back to the biblio details page and click on "Items" tab
CHECK => There is a new section in the item's details between "Statuses"
and "History" called "Priority"
11. Set exclude to "Yes" and update
12. repeat steps 7 to 9
SUCCESS => only the hold for patron1 now appears, even the other hold had local
hold priority
13. Repeat step 10 and 11 but this time set exclude to "No"
14. repeat steps 7 to 9
CHECK => the hold for patron2 is back
15. Edit patron2's category and set exclude from local holds priority to
    "Yes"
16. Repeat steps 7 to 9
SUCCESS => the hold for patron1 is back
17. Go to tools -> Batch item modification and in barcode list place
    several (existing) barcodes and press continue
CHECK => There is a new section in the bottom called "Priority"
18. Set exclude to "Yes" and save
SUCCESS => all items in the list now have exclude setted to "Yes"
19. Try to checkout the first item to a patron3
SUCCESS => Alert message appears saying that patron1 has a hold on that
item
20. Click on Yes and then checkin that item
SUCCESS => There is a modal window saying that a hold was found for
patron1
21. prove t/db_dependent/HoldsQueue.t t/db_dependent/Holds/LocalHoldsPriority.t
22. Sign off

Sponsored-by: Cooperative Information Network (CIN)
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
C4/HoldsQueue.pm
C4/Reserves.pm
admin/categories.pl
catalogue/updateitem.pl
koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt
tools/batchMod.pl