$logger->info("clearing current_copy and check_time for frozen hold ".$hold->id);
$hold->clear_current_copy;
$hold->clear_prev_check_time;
+ # Clear expire_time to prevent frozen holds from expiring.
+ $logger->info("clearing expire_time for frozen hold ".$hold->id);
+ $hold->clear_expire_time;
}
# If the hold_expire_time is in the past && is not equal to the
$hold->expire_time(calculate_expire_time($hold->request_lib));
}
+ # If the hold is reactivated, reset the expire_time.
+ if(!$U->is_true($hold->frozen) && $U->is_true($orig_hold->frozen)) {
+ $logger->info("Reset expire_time on activated hold ".$hold->id);
+ $hold->expire_time(calculate_expire_time($hold->request_lib));
+ }
+
$e->update_action_hold_request($hold) or return $e->die_event;
$e->commit;
--- /dev/null
+-- LP1076399: Prevent reactivated holds from canceling immediately.
+-- Set the expire_time to NULL on all frozen/suspended holds.
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+UPDATE action.hold_request
+SET expire_time = NULL
+WHERE frozen = 't';
+
+COMMIT;