katlog.orgdevelopment journal Demo catalogueDemo
LB004

Loan rules: home loan, reading room, not for loan

An 18th-century rare book and a new genetics handbook can’t be lent under the same rules. How Katlog sets rules per collection — and how one overly strict check stopped books being issued to the reading room.

Every library has books you can take home and books that are used only in the reading room. In the MPT01 catalogue this shows in the collection codes: BIB, RAR, REF, MAG and others. But the code itself says nothing about the rules — the librarian knows them.

Three rules

In Katlog, every collection has one of three rules:

  • Home loan — can be requested both for home loan and for the reading room.
  • Reading room only — the book is used on site only.
  • Not for loan — cannot be requested.

By default, RAR (rare books) and REF (reference) are reading room only; everything else is home loan. The librarian changes this in the settings, in a single table of all collections, which also shows the number of items and holds reader-facing names in three languages.

Katlog: Settings → Collections (codes, item counts, rule, names)
One table for every collection in the catalogue.

The rule belongs to the item, not the record

One title may have two copies in different collections: one in the main collection, another in reference. So the rule is determined by the collection of the specific copy. On the record page, each copy states how it can be obtained.

A bug caught by code reviewWhen preparing a request, the system compared the collection rule with the request type strictly: “reading room” accepted only copies whose rule was “reading room only”. A copy from a normal collection, which can be taken home, was not offered for reading-room use — even though you can obviously read it in the room too. The correct logic: for the reading room, both “home loan” and “reading room only” collections qualify.

Checked on the server

The rule is enforced by the server, not by the page in the browser. Even if someone tries to bypass the buttons and send a home-loan request for a rare book, the server won’t accept it. Items without a collection code — almost a third of our export — are treated as home loan by default. That is the first thing a librarian should check in the settings.