]> git.evergreen-ils.org Git - working/Evergreen.git/commit
LP#1818912: Single Day Emergency Closings Fail to Update Due Dates
authorSteven Mayo <smayo@georgialibraries.org>
Thu, 12 Oct 2023 18:42:01 +0000 (14:42 -0400)
committerJane Sandberg <js7389@princeton.edu>
Fri, 10 Nov 2023 22:45:52 +0000 (14:45 -0800)
commite1f0dead227d749d99e0aacbcbf13e65940932bf
treefff49277554dec5359f9bcc927f9c478bb8787f8
parent72bb8b5b063326095036523a995f064b8dc233d9
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>
Open-ILS/src/sql/Pg/096.schema.emergency_closing.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.function.emergency-closing-due-date-fix.sql [new file with mode: 0644]