[Koha-bugs] [Bug 13580] Item circ history has 'last seen' labeled wrong

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jan 27 00:29:24 CET 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13580

Katrin Fischer <katrin.fischer at bsz-bw.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|item circ history has 'last |Item circ history has 'last
                   |seen' labeled wrong         |seen' labeled wrong

--- Comment #8 from Katrin Fischer <katrin.fischer at bsz-bw.de> ---
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 

?

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list