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

            Bug ID: 43799
           Summary: cart_to_shelf cron waits an extra hour to update items
   Initiative type: ---
        Sponsorship ---
            status:
           Product: Koha
           Version: Main
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P5 - low
         Component: Command-line Utilities
          Assignee: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]
                CC: [email protected], [email protected]
        Depends on: 43546
  Target Milestone: ---

The cart to shelf cron says: 
--hours | -h         The number of hours that need to pass before the location
is updated.

But it's query is:
SELECT itemnumber FROM items WHERE location = 'CART' AND TIMESTAMPDIFF(HOUR,
items.timestamp, NOW() ) > ?

TIMESTAMPDIFF returns the number of full hours between two times. This means
that if I give the cron a parameter of 1, my item will not update until it's
been 2 full hours since the item was returned.

Assume the item was returned at 8:00 and I've given the cron a parameter of
--hours 1
At 8:59, TIMESTAMPDIFF(HOUR, items.timestamp, NOW()) = 0
At 9:00, TIMESTAMPDIFF(HOUR, items.timestamp, NOW()) = 1
At 9:59, TIMESTAMPDIFF(HOUR, items.timestamp, NOW()) = 1
at 10:00, TIMESTAMPDIFF(HOUR, items.timestamp, NOW()) = 2 -- it's finally
greater than 1 and my item updates


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43546
[Bug 43546] Standardize command-line scripts on Getopt::Long::Descriptive for
safer, more consistent option handling
-- 
You are receiving this mail because:
You are the assignee for the bug.
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