In Koha version 20.11, we have a new way to define how many items a patron can have checked out at a time. Previously, we've been able to set checkout limits either in a specific rule or at the patron level. So, for example, if we have an item type of BOOK and an item type of DVD, we can easily enough allow a patron to have up to 10 books and up to 10 DVDs, but not more than 15 items out at a time.
However, many libraries have circulation policies that dictate a more complicated setup of item types, which leads to more complicated rules. Sticking with our example from above, let's say our library decides it needs to separate out books with a specific holiday theme in order to give them a shorter lending period. That means a new item type and a new circulation rule.
That circulation rule contains a value for checkouts allowed, just like our existing rules. As my rules are written now, my patrons can have up to 10 books, up to 10 holiday books, and up to 10 DVDs with an overall limit of 15 items. But that's not quite what I was after. I wanted books and holiday books to get counted together, so I can only have up to 10 of that combined category. Until now, there hasn't been a way to do that.
Creating parent item types
To solve this problem, Koha has introduced the concept of "parent item types." When creating or editing an item type in Koha 20.11 and later, you'll see a new option.
A single item type can be a parent to any number of other item types, but any given item type can have one parent. Additionally, an item type with a parent cannot be a parent itself. You'll see these parent relationships on the item types page.
Creating circulation rules
Once you've defined at least one parent item type, you can start using those relationships in circ rules. When you select an item type in the circ matrix, you'll see a new format for any parent item types, in which you can pick either the parent or one of the children.
Here I've set up some very restrictive limits to give us a simple demonstration. In my first rule, I've limited all patrons to up to 2 books at a time. In my second rule, I've limited by patrons to up to 1 holiday book at a time. Because Books is the parent to Holiday Books, and Holiday Book is counted toward that Book total and our example patron is subject to both limits simultaneously.
So if my patron already has one Holiday Book checked out, they'll be blocked from checking out a second.
But they could check out a regular Book with that Holiday Book.
But at that point they've hit both the limit of up to 1 Holiday Book and up to 2 (combined Book and Holiday Book). If they try to check out a Book now, they'll get an error again.
Similarly, if they had 2 Books checked out they could not add a Holiday Book.
Checkout limits only
As we go through the behavior of parent/child item types, remember it only applies to the value in "Current checkouts allowed." Any other values in the Books rule (loan period, fines, renewals, holds, etc) apply *only* to Book checkouts and any other values in the Holiday Books rule apply only to Holiday Books.
Read more by Andrew Fuerste-Henry