In the items table we have these two columns: - datelastborrowed - the date the item was last checked out/issued - datelastseen - the date the item was last see (usually the last time the barcode was scanned or inventory was done) Based on these descriptions you would expect that datelastseen was always the same as or more recent than datelastborrowed, right? One of our customer libraries just made me aware that this is not always the case. This SQL finds the unexpected data: SELECT COUNT(*) FROM items WHERE datelastborrowed > datelastseen; Three of our sites have this unexpected data. They all use SIP2. But we also have a couple sites that use SIP2 that do *not* have unexpected data, so that might be a false lead. Anyone else seen this?
What are the values? SELECT datelastborrowed, datelastseen FROM items WHERE datelastborrowed > datelastseen LIMIT 10;
MariaDB [koha_bth]> SELECT datelastborrowed, datelastseen FROM items WHERE datelastborrowed > datelastseen LIMIT 10; +------------------+--------------+ | datelastborrowed | datelastseen | +------------------+--------------+ | 2018-09-13 | 2018-06-25 | | 2018-09-05 | 2015-10-09 | | 2018-09-05 | 2018-02-08 | | 2018-09-10 | 2017-12-14 | | 2018-06-08 | 2018-04-10 | | 2018-04-30 | 2016-10-20 | | 2018-07-10 | 2017-06-08 | | 2018-01-24 | 2017-01-19 | | 2018-07-31 | 2018-02-01 | | 2018-07-10 | 2018-01-16 | +------------------+--------------+
Sorry I do not have any ideas, the code looks ok. Maybe in September 2018 the Koha version was older? What is the % of items with this problem? Does it still happen?
This was either an artifact of the migration to Koha, or it stopped happening in March 2018. Closing.