CREATE INDEX hold_request_requestor_idx ON action.hold_request ( requestor );
CREATE INDEX hold_request_open_idx ON action.hold_request (id) WHERE cancel_time IS NULL AND fulfillment_time IS NULL;
CREATE INDEX hold_request_current_copy_before_cap_idx ON action.hold_request (current_copy) WHERE capture_time IS NULL AND cancel_time IS NULL;
+CREATE UNIQUE INDEX hold_request_capture_protect_idx ON action.hold_request (current_copy) WHERE current_copy IS NOT NULL AND capture_time IS NOT NULL AND cancel_time IS NULL AND fulfillment_time IS NULL;
CREATE TABLE action.hold_request_note (
--- /dev/null
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+CREATE UNIQUE INDEX CONCURRENTLY
+ hold_request_capture_protect_idx ON action.hold_request (current_copy)
+ WHERE current_copy IS NOT NULL -- sometimes null in old/bad data
+ AND capture_time IS NOT NULL
+ AND cancel_time IS NULL
+ AND fulfillment_time IS NULL;
+
+COMMIT;
+
JSAN.use('util.error'); var error = new util.error();
try {
var check = req.getResultObject();
- var r = circ.util.checkin_via_barcode2(session,params,backdate,auto_print,check);
+ var r = circ.util.checkin_via_barcode2(session,params,backdate,auto_print,check,async);
try {
error.work_log(
document.getElementById('circStrings').getFormattedString(
}
};
-circ.util.checkin_via_barcode2 = function(session,params,backdate,auto_print,check) {
+circ.util.checkin_via_barcode2 = function(session,params,backdate,auto_print,check,async) {
try {
JSAN.use('util.error'); var error = new util.error();
JSAN.use('util.network'); var network = new util.network();
check.what_happened = 'error';
sound.special('checkin.error');
error.standard_network_error_alert(document.getElementById('circStrings').getString('staff.circ.checkin.suggest_offline'));
+ } else /* UPDATE failed, and async */ if (check.ilsevent == 2001 && async) {
+ check.what_happened = 'error';
+ sound.special('checkin.error');
+ error.standard_network_error_alert(document.getElementById('circStrings').getString('staff.circ.checkin.possible_dupe_scan'));
} else {
if (check.ilsevent == null) { return null; /* handled */ }
# "Circulation" - check &staff.main.menu.circ.label; in lang.dtd
# "Offline Interface" - check &staff.main.menu.circ.offline.label; in lang.dtd
staff.circ.checkin.suggest_offline=Check In Failed. If you wish to use the offline interface, in the top menubar select Circulation -> Offline Interface
+staff.circ.checkin.possible_dupe_scan=Check In May Have Failed. Possible double-scan of the barcode. Use Item Status to confirm Check In and possible Hold capture.
staff.circ.checkin.renew_failed.error=Renew Failed for %1$s
staff.circ.checkin.renew_failed.override=Override Renew Failure?
staff.circ.renew.barcode=Barcode: %1$s