From fdb4c2e009b40e802ca4d6d86f50a6bda39cde2c Mon Sep 17 00:00:00 2001 From: Josh Stompro Date: Thu, 2 Mar 2023 12:12:17 -0600 Subject: [PATCH] LP1744341 Hold targeter --retarget-frozen - upgrade script Side effect is that frozen holds get checked to see if they are expired. Normally expire_time is unset when a hold is frozen, but there may have been some bugs in the past that have allowed frozen holds to have it set. This will just fix those so no holds get unexpectedly canceled when the new option is used. Signed-off-by: Josh Stompro --- ...xx.data.lp1744341.frozen_hold_remove_expire.sql | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Open-ILS/src/sql/Pg/upgrade/xxxx.data.lp1744341.frozen_hold_remove_expire.sql diff --git a/Open-ILS/src/sql/Pg/upgrade/xxxx.data.lp1744341.frozen_hold_remove_expire.sql b/Open-ILS/src/sql/Pg/upgrade/xxxx.data.lp1744341.frozen_hold_remove_expire.sql new file mode 100644 index 0000000000..1cd0a94045 --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/xxxx.data.lp1744341.frozen_hold_remove_expire.sql @@ -0,0 +1,24 @@ +BEGIN; + +#SELECT evergreen.upgrade_deps_block_check('xxxx', :eg_version); + +# LP#1744341 - Allow hold targeter to process frozen holds to update hold copy maps. + +# Side effect is that frozen holds get checked to see if they are expired. +# Normally expire_time is unset when a hold is frozen, but there may have +# been some bugs in the past that have allowed frozen holds to have it set. + +# This will just fix those so no holds get unexpectedly canceled. + +# Clear the expire_time from frozen holds. +UPDATE action.hold_request + set expire_time=null +where + frozen + and expire_time IS NOT NULL + and cancel_time IS NULL + and fulfillment_time IS NULL + and capture_time IS NULL +; + +COMMIT; -- 2.11.0