On this page: cgi-bin/koha/circ/bookcount.pl?&biblionumber=106124&bi=106124&itm=140197 the 'last seen' column is actually the timestamp - not the date last seen so it's confusing. The label should be changed or the value should be changed.
*** Bug 13581 has been marked as a duplicate of this bug. ***
Hm, it's not quite the timestamp either. It looks like a calculated date on when the item was 'last seen' in this library. It uses the newest date and time from issues, old_issues and branchtransfers. Maybe 'last seen at library'?
The pb with this timestamp is that it is changed by anonymisation
What data do we really want to see there ?
Maybe the datelastseen from items would work? I haven't verified, but if it's updated on checkout/checkin then that would work.
I would prefer the VERY LAST time the item was seen in any way by Koha show up in this screen via details.pl as it might help in searching etc. We have a record where Date last seen was showing the ISSUE date, and this puzzled a colleague. The items.datelastseen= 28/08/2019 (issue date - what details.pl showed), items.timestamp=13/11/2019 10:35 (the return date), old_issues.timestamp=13/11/2019 09:43 (probably the time the item was scanned by the puzzled staff member). I even had a look at statistics.timestamp at it showed 17/09/2019 22:04 (a renewal moment so not all that useful). In an inventory situation (but also generally), when Koha tells me the Date last seen, I expect it to be um... the date it was last seen! In this case I would prefer to see 13/11/2019 at 10:35.
To get there: * Detail page of an item, that has/had been checked out previously * Items tab * Link (View item's checkout history) I think 2 different bugs have been described here: 1) The column is labelled 'last seen' which is the same label used for items.datelastseen in the item table on the details page. But it's not the same data. ==> I believe we should find a better name for the column, which this bug report was initially about 2) The problem Ray raises is about the date not being accurate enough. What do we actually see here? There are 2 SQL queries in the code, the newest information is displayed: "SELECT MAX(tstamp) FROM ( SELECT MAX(timestamp) AS tstamp FROM issues WHERE itemnumber = ? AND branchcode = ? UNION ALL SELECT MAX(timestamp) AS tstamp FROM old_issues WHERE itemnumber = ? AND branchcode = ? ) tmp" ); Looks for the newest timestamp in issues and old_issues for this item AND checkout library. This should cover returns and checkouts, but it might fail if we mess with the timestamps (database updates can do that). Actually looking at issue date in issues and return date in old_issues might be a nice improvement. "SELECT MAX(transfer) FROM (SELECT max(datearrived) AS transfer FROM branchtransfers WHERE itemnumber=? AND tobranch = ? UNION ALL SELECT max(datesent) AS transfer FROM branchtransfers WHERE itemnumber=? AND frombranch = ? ) tmp" ); Looks for the newest date of in transfers, either when it arrived at the library or when it was sent from this library to another. The interesting bit is the 'library' limit in the queries. It's all about the last detectable action in a specific library. This makes a lot of sense as the table in question represents library specific information. If we used the datelastseen or timestamp of the item instead, the currently named "Last seen" column would lose it's meaning and always display the same information. I propose changing the label to clear the confusion a little. What about: * Last action at this library * Last checkout/checkin/transfer ?