Koha How-To

Set items to quarantine status upon return

In our town hall about dealing with COVID-19 closures, several partners mentioned that their libraries are quarantining returned items for several days before they're allowed to go out again. I've sketched out a way to make Koha help with that.

First, we need to create a new Not For Loan value of "Quarantine" (or whatever else you'd like to call it). To do so, go to Administration, then Authorized Values. Find and click the category NOT_LOAN, then click the button for New Authorized Value for NOT_LOAN. If you want to be able to place holds on items while they're set to your Quarantine status, make your authorized value a negative number. Use a positive number if you don't want to allow holds.

Now that our Quarantine status exists, there are a couple things we can do with it. First, we can tell Koha to set every item we check in to Quarantine. To do that, we'll use the system preference UpdateNotForLoanStatusOnCheckin. We want to tell it that whenever we check in an item no Not For Loan status to set it to the value we used for our new Quarantine status.

Next, we want to hide those items from the public catalog. This part is definitely optional, but I can imagine patrons not being excited to see books marked as "Quarantine" in the catalog. If you don't want to hide these items, you could alternatively set a nicer-sounding label for the OPAC in your authorized value setup. Just put the wording you prefer in the Description (OPAC) field. If you're hiding the items, use the OPACHiddenItems system preference. Tell it the field we want to limit on (notforloan) and the value we want to hide (the number you used for your Quarantine status)

At this point, every item you check in will get set to Quarantine and hidden from the OPAC. The next step is getting the quarantine status cleared after a set number of days. The consensus in our town hall seemed to be 4 days, but you can use whatever timeframe you like. We can't fully automate this part, but we can make it easy. A report can list all the items checked in 4 or more days ago that are set to Quarantine:

SELECT itemnumber, barcode, title, returndate, notforloan

FROM old_issues left join items using (itemnumber) left join biblio using (biblionumber)

WHERE date(old_issues.returndate) <= date_sub(curdate(),interval 4 day) and items.notforloan=-5

GROUP BY itemnumber

Do you see the Batch Modify button at the top of the itemnumber column in the report? Use that to send all of these items to Item Batch Modification, where you can clear the Quarantine status. Then the items are ready to go!

Read more by Andrew Fuerste-Henry