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 <berickxx@gmail.com>
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)