From dd8f8d5ed3df72b6e7e55ed5d81fb18eef7f13bf Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 3 Aug 2015 14:03:52 -0400 Subject: [PATCH] LP#1481036 Ignore future backdates (part 2). Ensure that future backdates are successully ignored in the checkin API. The logic was in place to do this, but it failed to clear the values, resulting in using the future backdate anyway. Signed-off-by: Bill Erickson Signed-off-by: Ben Shum --- .../perlmods/lib/OpenILS/Application/Circ/Circulate.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm index f4b7503d97..9bf33a9676 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm @@ -3463,12 +3463,14 @@ sub checkin_handle_backdate { $new_date->set_minute($original_date->minute()); if ($new_date >= DateTime->now) { # We can't say that the item will be checked in later...so assume someone's clock is wrong instead. - $bd = undef; + # $self->backdate() autoload handler ignores undef values. + # Clear the backdate manually. + $logger->info("circulator: ignoring future backdate: $new_date"); + delete $self->{backdate}; } else { - $bd = cleanse_ISO8601($new_date->datetime()); + $self->backdate(cleanse_ISO8601($new_date->datetime())); } - $self->backdate($bd); return undef; } -- 2.43.2