Bug 13580 - Item circ history has 'last seen' labeled wrong
Summary: Item circ history has 'last seen' labeled wrong
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL: cgi-bin/koha/circ/bookcount.pl?&bibli...
Keywords:
: 13581 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-01-14 19:19 UTC by Nicole C. Engard
Modified: 2023-12-06 16:01 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicole C. Engard 2015-01-14 19:19:10 UTC
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.
Comment 1 Owen Leonard 2015-01-22 19:17:28 UTC
*** Bug 13581 has been marked as a duplicate of this bug. ***
Comment 2 Katrin Fischer 2015-06-08 03:20:11 UTC
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'?
Comment 3 Katrin Fischer 2015-06-08 03:20:44 UTC
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'?
Comment 4 Sophie MEYNIEUX 2018-02-12 13:42:18 UTC
The pb with this timestamp is that it is changed by anonymisation
Comment 5 Sophie MEYNIEUX 2018-02-12 13:43:53 UTC
What data do we really want to see there ?
Comment 6 Katrin Fischer 2018-02-12 20:36:57 UTC
Maybe the datelastseen from items would work? I haven't verified, but if it's updated on checkout/checkin then that would work.
Comment 7 Ray Delahunty 2019-11-15 07:58:34 UTC
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.
Comment 8 Katrin Fischer 2023-01-26 23:29:24 UTC
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 

?