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

Alex Carver [Acerock7] <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #9 from Alex Carver [Acerock7] <[email protected]> ---
Adding this here, because I believe it's an issue with the original
cart_to_shelf.pl logic and not the updated script:


Because 0 is no longer an option, the smallest option is now 1. However,
because it's a whole integer, an item will only ever have a timestaff
difference of >1 after it's been on the cart for 2 hours.

So using this updated script it's impossible to put an item back to its
original location after it's been on the cart for an hour. For
"TIMESTAMPDIFF(HOUR, items.timestamp, NOW() ) > 1" to be true, it'd need to
have been on the cart for 2 hours or more.

Updating the logic to be:

"SELECT itemnumber FROM items WHERE location = 'CART' AND TIMESTAMPDIFF(HOUR,
items.timestamp, NOW() ) >= ?"

fixes that issue in my testing. But I'm not experienced enough to know whether
there's a deeper reasoning for the original logic or if adding >= messes with
anything else behind the scenes.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to