From 937afcc8cf8940dc6227b984ad78759789737bdd Mon Sep 17 00:00:00 2001 From: Eric Garcia Date: Tue, 6 Aug 2024 19:01:00 +0000 Subject: [PATCH] Bug 33641: Code changes To test: 1. Apply patch, restart_all, updatedatabase 2. Check out an item to a patron 3. Query the database - select return_branch from issues; should return NULL - select branchcode from issues; should return the branchcode of the library you checkout the item out from - select return_branch from old_issues; should match the branchcode from the previous query Signed-off-by: Andrew Fuerste-Henry Signed-off-by: Martin Renvoize --- C4/Circulation.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 58946ae12a3..4e83425250f 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2647,6 +2647,7 @@ sub MarkIssueReturned { $issue->returndate( \'NOW()' )->store->discard_changes; # update and refetch } + $issue->return_branch(C4::Context->userenv->{'branch'}); # Create the old_issues entry my $old_checkout = Koha::Old::Checkout->new($issue->unblessed)->store; -- 2.47.0