From 0f340f071d3f20dfa57836ff13a1e19a31d767d7 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Thu, 26 Feb 2026 17:36:47 +0000 Subject: [PATCH] Bug 41880: Keep original copy of hold for proper logging To test: 0. APPLY PATCH, restart_all. 1. Make sure HoldsLog is enabled 2. Place a record/bib level hold on bib A. 3. Move the hold to bib B. 4. Look at the diff column in the holds log. You should see the Old (0) biblionumber and the New (N) biblionumber. You should see nothing about itemnumber because this is a record level hold. 5. Ensure that the New and Old biblionumbers are the correct ones. 6. Place an item level hold on item A. 7. Mobe the hold to item B 8. Look at the diff column in the holds log. You should see the Old (0) biblionumber and the New (N) biblionumber. You should also see the New and Old itemnumbers since this is an item level hold. 8. Ensure that the New and Old biblionumbers AND the New and Old itemnumbers are correct. Signed-off-by: David Nind --- Koha/Hold.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Koha/Hold.pm b/Koha/Hold.pm index d886f7d8b5..f4b1b88cf3 100644 --- a/Koha/Hold.pm +++ b/Koha/Hold.pm @@ -188,10 +188,10 @@ $hold->move_hold(); sub move_hold { my ( $self, $args ) = @_; - my $original = $self; + my $original = $self->unblessed; my $original_biblionumber = $self->biblionumber; - my $found = $original->found // ''; + my $found = $self->found // ''; if ( $found eq 'W' ) { return { success => 0, error => 'Cannot move a waiting hold' }; -- 2.39.5