Koha How-To

Koha Question of the Week: How Do I Search the Hold Logs?

Each Friday, we will bring you a new Koha Question of the Week. We will select real questions that we receive and share the answers with you!

Question: How Do I Search the Hold Logs?

Answer: Koha's action logs are powerful tools for solving circulation mysteries, but the holds action log is a unique beast. For searching circulation logs and cataloging logs, we can use borrowernumber or biblionumber as the object to see the respective history, but the holds log uses a unique identifier that is harder to find: the reserve_id.

Like all logs in Koha, the holds log must, of course, be enabled. That is controlled by the HoldLog system preference and is typically a log we have turned on by default in our partners' sites.

With that enabled, you need a way to find the reserve_id. The Koha Reports Wiki has one such report to search the hold logs by a user's card number: Show action logs for holds. That particular report will spit out all of a user's hold log data from either the reserves or old_reserves data. This might be a lot to comb through for a power hold user, so you can also save a report like the following to your reports library to grab the reserve_id and enter it in the holds log to search for just the history of holds on a particular record:

select biblio.title, holds.reserve_id
(select borrowernumber, biblionumber, reserve_id from reserves union select borrowernumber, biblionumber, reserve_id from old_reserves) holds
left join borrowers using (borrowernumber)
left join biblio using (biblionumber)
where borrowers.cardnumber=<<Enter cardnumber>> and holds.biblionumber=<<Enter biblionumber>>

Here is a what you'll see and where you can use that newly found reserve_id. I rarely use a date limiter or limit by specific actions when searching by a specific hold since I'm often digging into the lifetime history of the hold, and searching for one particular hold is going to be a fairly limited search.

Hold logs in action

Many hold mysteries can be solved with hold logs, whether that is when expiration dates were extended and by whom, how a hold was cancelled, or even the suspension and unsuspension history of a hold. Got a patron disputing their hold priority and insisting they should have gotten that book weeks ago? Hold logs can answer that. They can also provide useful data points when we're identifying hold-related bugs.

These logs won't solve every mystery, and they're certainly no substitute for talking with circulation staff to learn context for a decision or what was happening in a workroom on a given day, but they can narrow down the window of when and where something happened.

Additional Resources

Koha Wiki - SQL Reports Holds