[open-ils-commits] [GIT] Evergreen ILS branch master updated. 37b2d387bb0ea1a6581c3106a45a978bf70a632c
Evergreen Git
git at git.evergreen-ils.org
Mon Jun 15 15:15:14 EDT 2015
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, master has been updated
via 37b2d387bb0ea1a6581c3106a45a978bf70a632c (commit)
via cc2c1ecfb501f2cbd119b29dd218ecd50fd8d74d (commit)
via 32e415a205c40f013d8839a02bb50033a0606072 (commit)
from 71addb175019ff39bf522d4e73f6bda759486867 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 37b2d387bb0ea1a6581c3106a45a978bf70a632c
Author: Mike Rylander <mrylander at gmail.com>
Date: Fri Jun 12 14:29:02 2015 -0400
LP#902255: Use simple alert box
Instead of the generic communication error dialog, we'll use
the simple yns_alert box instead.
Signed-off-by: Mike Rylander <mrylander at gmail.com>
Signed-off-by: Kathy Lussier <klussier at masslnc.org>
Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
diff --git a/Open-ILS/xul/staff_client/server/circ/util.js b/Open-ILS/xul/staff_client/server/circ/util.js
index 2328f4f..32bfabf 100644
--- a/Open-ILS/xul/staff_client/server/circ/util.js
+++ b/Open-ILS/xul/staff_client/server/circ/util.js
@@ -3609,7 +3609,13 @@ circ.util.checkin_via_barcode2 = function(session,params,backdate,auto_print,che
} 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'));
+ error.yns_alert(
+ document.getElementById('circStrings').getString('staff.circ.checkin.possible_dupe_scan'),
+ document.getElementById('circStrings').getString('staff.circ.alert'),
+ document.getElementById('circStrings').getString('staff.circ.utils.msg.ok'),
+ null, null,
+ document.getElementById('circStrings').getString('staff.circ.confirm.msg')
+ );
} else {
if (check.ilsevent == null) { return null; /* handled */ }
commit cc2c1ecfb501f2cbd119b29dd218ecd50fd8d74d
Author: Mike Rylander <mrylander at gmail.com>
Date: Thu Jun 11 08:49:21 2015 -0400
LP#902255: Correct "ILS Event at check in" logic
In a classic case of "fix a bug to reveal another" it turn out that
there was a small logic bug hiding in the check in hold-capture code.
The result of this bug was that the wrong ILS Event object was being
returned when we ran into the double-scan hold-capture situation by
overwriting the correct one immediately after we construct it, which
in turn prevented the previous commit from working as designed.
We now return the correct ILS Event immediately so that we can
properly detect the situation. Two birds with one branch.
Signed-off-by: Mike Rylander <mrylander at gmail.com>
Signed-off-by: Kathy Lussier <klussier at masslnc.org>
Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Utils/CStoreEditor.pm b/Open-ILS/src/perlmods/lib/OpenILS/Utils/CStoreEditor.pm
index c289324..d1a935e 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Utils/CStoreEditor.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Utils/CStoreEditor.pm
@@ -847,13 +847,13 @@ sub runmethod {
my $evt = OpenILS::Event->new(
'DATABASE_UPDATE_FAILED', payload => $arg, debug => "$err" );
$self->event($evt);
+ return undef;
}
if( $err ) {
$self->event(
OpenILS::Event->new( 'DATABASE_QUERY_FAILED',
payload => $arg, debug => "$err" ));
- return undef;
}
return undef;
commit 32e415a205c40f013d8839a02bb50033a0606072
Author: Mike Rylander <mrylander at gmail.com>
Date: Mon Jun 8 11:11:04 2015 -0400
LP#902255: Protect against hold double-capture
When the staff client is in Fast Scan (async) mode, it is possible
to double-scan at checkin and cause two holds to be captured by the
same item. By creating a specially crafted unique index we ensure
that the database rejects this situation.
This protection would cause unhandled errors in the staff client, so
we also register a new string to be displayed when this particular
situation occurs, alerting staff to the possible double-scan of a
barcode at checkin IFF they are using async mode.
Signed-off-by: Mike Rylander <mrylander at gmail.com>
Signed-off-by: Kathy Lussier <klussier at masslnc.org>
Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
diff --git a/Open-ILS/src/sql/Pg/090.schema.action.sql b/Open-ILS/src/sql/Pg/090.schema.action.sql
index 0a1c5bf..ca1e7f3 100644
--- a/Open-ILS/src/sql/Pg/090.schema.action.sql
+++ b/Open-ILS/src/sql/Pg/090.schema.action.sql
@@ -429,6 +429,7 @@ CREATE INDEX hold_request_fulfillment_staff_idx ON action.hold_request ( fulfill
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 (
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.disallow-double-capture.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.disallow-double-capture.sql
new file mode 100644
index 0000000..e644d35
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.disallow-double-capture.sql
@@ -0,0 +1,13 @@
+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;
+
diff --git a/Open-ILS/xul/staff_client/server/circ/util.js b/Open-ILS/xul/staff_client/server/circ/util.js
index 96eee5b..2328f4f 100644
--- a/Open-ILS/xul/staff_client/server/circ/util.js
+++ b/Open-ILS/xul/staff_client/server/circ/util.js
@@ -2666,7 +2666,7 @@ circ.util.checkin_via_barcode = function(session,params,backdate,auto_print,asyn
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(
@@ -2772,7 +2772,7 @@ circ.util.checkin_via_barcode = function(session,params,backdate,auto_print,asyn
}
};
-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();
@@ -3606,6 +3606,10 @@ circ.util.checkin_via_barcode2 = function(session,params,backdate,auto_print,che
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 */ }
diff --git a/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties b/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties
index 6a2aea1..415eb97 100644
--- a/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties
+++ b/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties
@@ -450,6 +450,7 @@ staff.circ.checkin.error=Check In Failed (in circ.util.checkin) (%1$s):
# "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
-----------------------------------------------------------------------
Summary of changes:
.../src/perlmods/lib/OpenILS/Utils/CStoreEditor.pm | 2 +-
Open-ILS/src/sql/Pg/090.schema.action.sql | 1 +
.../XXXX.schema.disallow-double-capture.sql | 13 +++++++++++++
Open-ILS/xul/staff_client/server/circ/util.js | 14 ++++++++++++--
.../server/locale/en-US/circ.properties | 1 +
5 files changed, 28 insertions(+), 3 deletions(-)
create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.disallow-double-capture.sql
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list