Back in 2020, I wrote this blog post detailing where to find all of your circ rules in the database, should you wish to view them via SQL rather than via the regular interface. At that time, our partner libraries were on Koha version 19.05 and the various circulation rules were scattered across several tables in the database.
In Koha version 20.05, we overhauled how circ rules get stored. Now everything gets stored in the circulation_rules table. As you can see in the schema, this table records the library, patron category, and item type to which this rule applies, a "rule_name," and a "rule_value." With this basic structure, we can keep all our rules in one easy place. If library, category, or itemtype are empty in a rule, we know that's an "All" or default rule. To give a visual example, here's part of a simple All/All rule and what it shows in the database:
So we don't have a set of cryptic table names to remember anymore, but we do have a list of possible rule_names to keep track of. Most of them are fairly clear, but a few get confusing. In the following screenshots, I've numbered the various fields on the circulation rules page to correspond with an alphabetical list of rule_names.
- article_requests - determines whether or not article requests are allowed
- auto_renew - determines whether or not checkouts renew automatically
- cap_fine_to_replacement_price - determines whether or not the overdue fine is capped at the item's replacement price
- chargeperiod - sets the fine charging interval
- chargeperiod_charge_at - determines when in the interval the fine is charge
- fine - sets the fine amount
- finedays - sets the number of days for a suspension
- firstremind - sets the grace period
- hardduedate - sets the date in a hard due date
- hardduedatecompare - sets the comparison for a hard due date
- hold_fulfillment_policy - records the value for "Hold pickup library match" at either the default or itemtype levels
- holdallowed - records the value for "Hold policy" at either the default or itemtype levels
- holds_per_day - sets the number of holds allowed per day
- holds_per_record - sets the number of holds allowed per record
- issuelength - sets the loan period
- lengthunit - records the unit in which the loan, fine, and suspension intervals are measured
- max_holds - records the value for "Total holds allowed" at either the default or category levels
- maxissueqty - sets "Current checkouts allowed" for a specific rule
- maxonsiteissueqty - sets "Current on-site checkouts allowed" for a specific rule
- maxsuspensiondays - sets the maximum number of suspension days
- no_auto_renewal_after - sets the number of days after which an automatic renewal is prevented
- no_auto_renewal_after_hard_limit - sets the date for a hard limit for automatic renewal
- norenewalbefore - sets the number of days before the due date in which to allow renewal
- note - records a note about this circulation rule
- onshelfholds - determines whether or not on-shelf holds are allowed
- opacitemholds - determines whether or not item-level holds are allowed via the OPAC
- overduefinescap - sets the amount at which to cap overdue fines
- patron_maxissueqty - records the value for "Total current checkouts allowed" at either the default or category levels
- patron_maxonsiteissueqty - records the value for "Total current on-site checkouts allowed" at either the default or category levels
- refund - records the value for "lost item fee refund on return policy"
- renewalperiod - sets the length of a renewal
- renewalsallowed - sets the number of renewals allowed
- rentaldiscount - sets the rental discount
- reservesallowed - sets "Holds allowed (total)" for a specific rule
- returnbranch - records the value for "Return policy" at either the default or itemtype levels
- suspension_chargeperiod - sets the suspension interval
Read more by Andrew Fuerste-Henry