[Koha-devel] Can we do away with items.onloan?

Barton Chittenden barton at bywatersolutions.com
Sun May 20 06:50:39 CEST 2018


On Sat, May 19, 2018 at 6:20 PM, Katrin Fischer <katrin.fischer.83 at web.de>
wrote:

> Hi Manos,
>
> it's an item field, so it's added for every item in 952/955.
>
> As the complete items information is added on time of indexing, I think
> what Barton suggests is already the case?
>

That's my understanding.

For background: Data in the biblio and/or biblioitems table is copied to
biblio_metadata.metadata (this was once biblioitems.marcxml).  Item data is
*not* stored in the metadata field -- each item is appended to the marcxml
record at the time of indexing. This includes items.onloan, and this is how
the 'available' status is displayed item by item in the list view of the
opac and staff catalog search.

This works well most of the time -- but not all... my contention is that
removing items.onloan, and reading from issues.date_due instead gives a
single point of truth for the on-loan status of an item.

Try running this as a report to see if any of your items are affected:

select count(*) from issues inner join items using (itemnumber) where
date(issues.date_due) != items.onloan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20180520/d2dc05dd/attachment.html>


More information about the Koha-devel mailing list