Circulation Rules: decreaseLoanHighHolds and useDaysMode
Koha version 20.11 adds some great new flexibility to circulation rules and date due calculations. Two features that used to be defined only as system preferences are moving into the circulation rules. That means where we used to have to define one behavior for all checkouts in your system, now we can set different behaviors based on the library, patron, and item involved in the checkout.
First, we have an update to the processes around the decreaseLoanHighHolds system preference. This is a tool that allows Koha to automatically reduce loan periods for titles with long holds lists.
Second, we have a comparable change around the useDaysMode system preference. This is what determines how Koha determines due dates when the library is closed.
While both of these system preferences still exist, they both now have corresponding columns in the circulation rules matrix.
This set of interconnected system preferences defines under which circumstances a loan period should be shortened due to a high number of holds.
First, note the Enable/Disable dropdown. If that's set to Disable, none of the other values discussed here will be enforced. On the other hand, setting this to Enable without defining the other values may have unintended consequences.
With the values I have set here, when I perform a checkout Koha will do some quick math to count up how many holdable items are on this title (excluding any damaged, lost, not for loan, or withdrawn items). If number of holds on this title is over the number of holdable items by more than 1, then Koha will try to use the loan period set here (7 days) instead of the loan period in my circ rules. If the original loan period would have been longer than 7 days, the shorter value is substituted in.
Here are some corresponding circulation rules. Note the values in the column labeled "Decreased loan period for high holds (day)." At checkout, any values in that column will get used instead of the 7 days I defined in my system preference. That follows Koha's general logic of "always use the most specific circulation rule possible."
This days value is the only part of the system preference that gets overwritten in the circulation rules. The basic criteria of "try to reduce the loan period if we have more than 1 hold over the count of holdable items" is still set universally in the system preference.
My All/All rule says items normally check out for 14 days. This rule does not contain a value for Decreased Loan Period. At checkout of an item following this rule, if the title meets the criteria for high holds, Koha will make the item due in 7 days instead of 14, using the value from the system preference.
My All/Visual Materials rules says those items normally check out for 7 days. At checkout of a Visual Materials item, if the title meets the criteria for high holds, Koha will make the item due in 4 days instead of 7, using the value in the Decreased Loan Period column.
Finally, my All/Maps rules says those items normally check out for 30 days. I don't want my maps to be subject to decreaseLoanHighHolds at all. As I said, the high holds criteria is enforced universally, so I don't have a way to tell Koha to exempt my maps from that process, exactly. Instead, I've given Maps a Decreased Loan Period of 30. At checkout of a Maps item, if the title meets the criteria for high holds, Koha will (technically-speaking) make the item due in 30 days instead of 30. In other words, the due date doesn't change.
If your Decreased Loan Period value is larger than your regular Loan Period for that rule, the decreased value will be ignored.
When these rules are triggered at checkout, you'll get a circulation popup alerting you to the situation. You'll have the option to not decrease the loan period if desired.
This system preference determines how and if Koha uses your calendar to calculate due dates.
As with decreaseLoanHighHolds, in previous versions of Koha the value we select here has been applied to all checkouts but starting in 20.11 we'll be able to move this into the circulation rules.
In my example library, I have my system preference set to "Use the calendar to skip days the library is closed." Looking at my circ matrix, my previous rules for All/All, All/Visual Media, and All/Maps, I've left the Days Mode column set to Default, which means those checkouts will follow the system preference.
However, I've added a new rule for Home Bound patrons. They get all items for 28 days and have Days Mode set to Same Week Day. If I hover my mouse over that value, a helpful explanation pops up: "Use the calendar to push the due date to the next open matching weekday for weekly loan periods, or the next open day otherwise." My pretend Home Bound patrons like all their items due on the same day of the week, but the Monday folks run into trouble on Labor Day and Memorial Day. Now I can make them follow a different system so their items roll to the following Monday, rather than just to the next Tuesday. (Also, I went ahead and put in 28 for their Decreased Loan Period, too, so they're exempt from that process).
Read more by Andrew Fuerste-Henry