Bug 34899 - Circulation rules: Only allow "Local use" patron category to place holds on specific library's items
Summary: Circulation rules: Only allow "Local use" patron category to place holds on s...
Status: REOPENED
Alias: None
Product: Koha
Classification: Unclassified
Component: System Administration (show other bugs)
Version: Main
Hardware: All All
: P5 - low major with 10 votes (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-23 14:34 UTC by Steve, OSLRI, USA
Modified: 2024-05-03 16:12 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steve, OSLRI, USA 2023-09-23 14:34:07 UTC
Use Case:
We have 50 member libraries in 72 locations.  Most regular patrons enjoy privileges at any member library.  However, libraries do offer limited use cards to vacationers, etc.  Those patrons are only allowed to checkout and place holds on local items.

We would love them to be able to place a hold in Aspen but have the circulation rules applied such that they are only eligible for a hold on the copy owned by their home library.

Unfortunately, that does not appear possible due to the order in which loan rules are currently applied via the Koha Sys Admin interface.  We attempted to create rules that would disallow checkouts and holds at all other libraries for a given local use patron, but sadly it did not work.

Apologies if this is already in another ticket!
Comment 1 Katrin Fischer 2023-09-23 15:29:39 UTC
Hi Steve, this should already be possible - but maybe it would be easier to help you on the mailing list or on IRC. Some first things to check would be your CircControl and ReservesControlBranch settings. They determine which rules will be selected when trying to place a hold or checkout.
Comment 2 Nick Clemens (kidclamp) 2023-09-26 16:43:57 UTC
We did look into this one at KohaUS - with the settings they are using it doesn't seem to be possible, however, from what we understood it should have been.

I think we might end up with a better title once we understand why, the issue is valid from what I observed.

Steve, can you supply the settings Katrin asked about and illustrate what was tested?
Comment 3 Steve, OSLRI, USA 2023-09-27 12:02:54 UTC
With apologies for length, I'll add a bit more information in hopes to inform ongoing chat:

@ Katrin Fischer

CircControl = "The library the item is from."

ReservesControlBranch = "Item's home library."

Essentially, our loan rules are governed by the owning library or "homebranch" in Koha.


@ All

Here's a bit more:

Generally speaking, our loan rules are set at the Specific Library + Specific Item Type Level w/ Patron Category wildcarded.

Given the order of precedence advertised at the top of the circulation rules page, it appeared that we should be able to set a rule at the Specific Library + Specific Patron Category w/ Item Type wildcarded to limit a patron category to only placing holds on items owned by their branch.  Alas, no.  Here's a bit more from the ticket I opened with ByWater.

Note that we are testing this with a patron category LUOBAR (Local Use Only Barrington) with our BAR (Barrington) branch.  We found a bib with items from five branches including one from BAR that was conveniently checked out.  All happen to be of the MUSICCD item type.  We then placed a hold from an LUOBAR patron on that item and waited from the holds queue cron to run to see what happened.  Sadly, rather than "waiting" for the BAR item to be returned, it keeps popping another library's item into the queue to fill the hold right away.

LUOBAR patrons by policy should only be able to checkout and place holds on BAR items.  We tried to set up the loan rules in the system with help from ByWater to do this, but holds were trapping a non-BAR item consistently.

QUERY:

select * from circulation_rules where 
rule_name in ('decreaseloanholds', 'hold_fulfillment_policy', 'holdallowed', 
    'holds_per_day', 'holds_per_record', 'max_holds', 'onshelfholds', 
    'opacitemholds', 'reservesallowed', 'waiting_hold_cancellation')
and (branchcode is null or branchcode = 'NPT')
and (categorycode is null or categorycode = 'LUOBAR')
and (itemtype is null or itemtype = 'MUSICCD')
order by branchcode, categorycode, itemtype

RESULTS:
id    branchcode    categorycode    itemtype    rule_name    rule_value
69369    NPT    LUOBAR    NULL    reservesallowed    0
69393    NPT    LUOBAR    NULL    opacitemholds    N
69377    NPT    LUOBAR    NULL    onshelfholds    2
69376    NPT    LUOBAR    NULL    holds_per_record    0
69371    NPT    LUOBAR    NULL    holds_per_day    0
69370    NPT    LUOBAR    NULL    decreaseloanholds    
44429    NPT    NULL    NULL    hold_fulfillment_policy    any
44430    NPT    NULL    NULL    holdallowed    from_any_library
44432    NPT    NULL    NULL    max_holds    25
69499    NULL    LUOBAR    NULL    reservesallowed    0
69473    NULL    LUOBAR    NULL    opacitemholds    N
69496    NULL    LUOBAR    NULL    onshelfholds    2
69465    NULL    LUOBAR    NULL    max_holds    0
69495    NULL    LUOBAR    NULL    holds_per_record    0
69490    NULL    LUOBAR    NULL    holds_per_day    0
69500    NULL    LUOBAR    NULL    decreaseloanholds    
279    NULL    NULL    NULL    hold_fulfillment_policy    any
278    NULL    NULL    NULL    holdallowed    from_any_library
53714    NULL    NULL    NULL    holds_per_day    0
53713    NULL    NULL    NULL    holds_per_record    
283    NULL    NULL    NULL    max_holds    25
53717    NULL    NULL    NULL    onshelfholds    1
53722    NULL    NULL    NULL    opacitemholds    N
53691    NULL    NULL    NULL    reservesallowed    0
154    NULL    NULL    NULL    waiting_hold_cancellation    1
53698    NULL    NULL    NULL    decreaseloanholds
Comment 4 Katrin Fischer 2023-10-30 00:11:02 UTC
On first glance, I would have expected that the hold policy:

From home library: Only patrons from the item's home library may put this book on hold.

would do the trick.

I haven't tested, but mine would look a little different than the ones from your example:

| 27 | NULL       | NULL         | BK       | hold_fulfillment_policy          | homebranch        |
| 28 | NULL       | NULL         | BK       | returnbranch                     | homebranch        |
| 29 | NULL       | NULL         | BK       | holdallowed                      | from_home_library |
Comment 5 Steve, OSLRI, USA 2023-10-30 10:30:51 UTC
Hi Katrin,

We are setup for "owning library rules".

Therefore, unfortunately, the settings that you reference in your reply can only be set by default for all locations or by each location.

Essentially, we can turn holds off or on for all borrower categories at a given location, but we can not give different permissions to different types of borrowers.

It is interesting that under the heading "Default holds policy by item type" for a given owning library location, we can tweak those settings, but that there isn't similar functionality under the heading "Default checkout, hold policy by patron category".

Perhaps the fix is to mirror the settings under those headings?  In this case, that would be adding the following as configuration options under the "Default checkout, hold policy by patron category" heading:

 * hold_fulfillment_policy
 * holdsallowed
 * returnbranch

Those do appear to be the settings that are both not possible for us to fully manage and necessary to tweak holds privileges for specific borrower categories when using owning library rules.
 
Best,
Steve
Comment 6 Katrin Fischer 2024-04-01 13:39:49 UTC
Hi Steve, I have to admit defeat I think. 

It feels like one of the things that should be possible, but maybe it's indeed not. I am not sure why the settings are not available on the "all libraries" page. We would probably need a real holds expert here.
Comment 7 Steve, OSLRI, USA 2024-04-01 14:08:18 UTC
I appreciate you taking a close look, Katrin!
Comment 8 Alex Carver 2024-04-22 18:57:13 UTC
+1 from Ramapo Catskill Library System. We are also struggling to restrict our "Local Use" patrons to items owned by their Home Libraries.