Koha How-To
Koha Question of the Week: What hold status details can be found in the Koha database?
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: What hold status details can be found in the Koha database?
Answer: Hold data is stored in two tables: reserves and old_reserves. The data lives in the reserves table from the time a hold is placed until it is filled or canceled, then it moves from the reserves table to the old_reserves table upon completion. Expired holds can be found in both tables because they still need to be canceled (whether manually or automatically) once the expiration date is reached for this move to happen.
More information about a hold can be found by looking at the code in the “found” column of the reserves and old_reserves tables:
While “canceled” isn’t a hold status with its own code, the other statuses in the “found” field of the old_reserves table can be used to determine whether a hold was canceled. The code “F” means the hold was filled, while all other codes indicate the hold was canceled at some point.
The various date fields in the reserves and old_reserves tables (such as reservedate, cancellationdate, waitingdate, and timestamp) can be used to determine when a particular action or status change occurred (for example, when a hold was placed or when it became “waiting”).
This isn’t the full extent of the hold data stored in the reserves and old_reserves tables, but the data points listed above are those most frequently used when building reports related to hold statuses.
Here’s an example report that gives a count of holds by action/status (placed, filled, canceled, and waiting) in a selected date range
Read more by Sara Porter