LP#
1818912: Single Day Emergency Closings Fail to Update Due Dates
Correctly
The original version of evergreen.find_next_open_time() was only
checking the hours of operation of the organization after it recursed at least
once - meaning it was just taking the first day it looked at even if it
closed. The variable making it only check after a recursion had no other
uses afterwards, so I've removed it as an argument. I also made sure it
doesn't get stuck in a loop if all the hours of operation of the org it's
checking are closed, since that was on the mind.
There may still be timezone chicanery left, judging from launchpad
comments, but hopefully this is at least better. Gunkier databases that
are copies of your productions may be better for testing.
Steps to test:
[1] Have some circulations, loans, and expire times that fall on a
certain day.
[2] Have some days where your org is closed.
[3] Add an emergency closure that lasts until the day before your org is
closed, and process that closure.
[4] Check that the circs, loans and whatnot are now due the first day
your org is open again.
[5] Have some more circs and whatnot due the day before another closure
(emergency or otherwise)
[6] Add an emergency closure that ends the day before the other closure
and process the new closure.
[7] Check that the circs and whatnots are updated to the correct day.
Signed-off-by: Steven Mayo <smayo@georgialibraries.org>
Signed-off-by: Andrea Buntz Neiman <abneiman@equinoxOLI.org>
Signed-off-by: Jane Sandberg <js7389@princeton.edu>