From 9d3b39e94de837cfc08259ae5778fb0372b662ff Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 20 Oct 2017 15:56:20 -0300 Subject: [PATCH] Bug 19487: Refetch the object to get up-to-date values This has been raised by failures on t/db_dependent/Circulation/issue.t (thanks tests!) Signed-off-by: Jonathan Druart (cherry picked from commit 850243ee2ec66a4b569d29ed84423f09c0001690) Signed-off-by: Fridolin Somers --- C4/Circulation.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index fb8d365484..d5ee99f32a 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2174,6 +2174,9 @@ sub MarkIssueReturned { # Update the returndate $dbh->do( $query, undef, @bind ); + # We just updated the returndate, so we need to refetch $issue + $issue->discard_changes; + # Create the old_issues entry my $old_checkout = Koha::Old::Checkout->new($issue->unblessed)->store; -- 2.39.5