From d745f09ea8983527f7bfeac2b24751952a812588 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Thu, 22 Jun 2017 11:28:47 -0400 Subject: [PATCH] JBAS-1728 Avoid null email/print on batch renew fail Avoid trying to email/print info about failed batch renewals, otherwise the page gets stuck on logout. Print/email info on failed batch renewals could be added, but to do so means propagating circ IDs into the renewal functions. Signed-off-by: Bill Erickson --- Open-ILS/web/js/ui/kcls/circ/selfcheck/selfcheck.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Open-ILS/web/js/ui/kcls/circ/selfcheck/selfcheck.js b/Open-ILS/web/js/ui/kcls/circ/selfcheck/selfcheck.js index 2dbb17beee..d627379ec2 100644 --- a/Open-ILS/web/js/ui/kcls/circ/selfcheck/selfcheck.js +++ b/Open-ILS/web/js/ui/kcls/circ/selfcheck/selfcheck.js @@ -1223,7 +1223,15 @@ SelfCheckManager.prototype.handleXactResult = function(action, item, result) { popup = true; sound = 'checkout-failure'; - if(action == 'renew') + // JBAS-1728 + // this.prevCirc is only set when attempting to auto-renew + // an existing checkout. It is not (currently) set when doing + // a straight up renewal. This means renewal failures will only + // appear in receipts in the auto-renew context. If we need to + // add support for showing renewal failures to receipts in batch- + // renewal mode, see renewItems() and pass the circ ID in to use + // as the prevCirc value instead. + if(action == 'renew' && this.prevCirc) this.checkouts.push({circ : this.prevCirc, renewal_failure : true}); if(result.length) -- 2.11.0