Koha How-To

New System Preference for Trapping Holds

New System Preference

A new system preference, TrapHoldsOnOrder, will be introduced in 19.11 to allow libraries to tell Koha whether an item with a negative Not for Loan value should be trapped or not. By “trapping” a hold, we refer to staff getting the pop-up box with hold actions (confirm, print, ignore) on it when they check an item in.

This system preference can be used on its own so that items with a negative not for loan value are never trapped for holds, but it can also be used with the popular UpdateNotForLoanStatusUponCheckin and the UpdateItemLocationOnCheckin system preferences. See this blog post for more information about changing status and location upon check-in.

How will this help libraries?

TrapHoldsOnOrder will be helpful for libraries that use a two-stage process for new materials.

For example, my library adds new items to the catalog as Not for Loan of -1 (ordered). When that item is received and the item record is updated, I’ll check it in and pass it to In Processing. I don’t want a hold to trigger at that first check-in, so having this system preference set to Don’t Trap will prevent the hold from triggering.

Additionally, due to the current coronavirus libraries are handling their returned material in a different way: there is a desire to quarantine the items before checking them out to the next patron.

Andrew wrote an extremely helpful blog post about using the NotForLoan Status in Koha to change returned materials to a unique status. For many libraries, this status was a negative value, so patrons could still place it on hold, but libraries knew which materials needed to be quarantined. Andrew took one step further in this process after our Town Hall about closing libraries and filed a bug about trapping holds in Not for Loan statuses.

If a library would like to not trap holds when the item is in a Not for Loan status of -5 (quarantine) for example, then upon check-in, the item is set to the Not for Loan status of -5 using the system preference UpdateNotForLoanStatusOnCheckin, the item gets checked in, and the hold is not trapped. Staff would not see the pop-up box with the holds actions.

For the items that the library does want to trigger holds on specific Not for Loan values, that is possible too. If a library would like all items that have -2 (In Processing) Not for Loan status to be available upon check-in they would enter this into the system preference, UpdateNotForLoanStatusOnCheckin to have this value:

-2: 0

This would indicate that an item with a Not for Loan value of -2 (In Processing) will be updated to 0 (available) at check-in and thus have the hold captured, but the -5 (quarantine) item would not be made available nor would a hold be trapped.

What if a library doesn't need this change?

For libraries that want to trap all the holds, nothing has changed in the workflow for circulation. The system preference defaults to “trap” That is the true beauty of a system preference- each library can choose their own path!

For many libraries, this new system preference will allow for items that are currently checked out to immediately go into quarantine upon check-in without having to “ignore the holds” with each check-in. Then once the allotted time has passed, the library can easily change the Quarantined items to the available status and pull the holds necessary to alert their patrons the materials are ready for pickup!


A huge shout out to Andrew for filing this bug 25184 and for Kyle Hall for creating a patch!

Want to learn more about 19.11?

Check out the 19.11 Upgrade Note blog post for all the features coming in 19.11!