From 85e91c80c2b838e48c380c4facc9d149f44528c6 Mon Sep 17 00:00:00 2001 From: Alex Buckley Date: Sun, 12 Nov 2023 21:26:42 +0000 Subject: [PATCH] Bug 35293: Re-implement bug 30407 functionality MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit To test: 1. Set a book items notforloan status as -1 and set the AllowNotForLoanOverride system preference to 'Allow' 2. Add the following lines to UpdateNotForLoanStatusOnCheckin (the formatting and indentation is important to keep): BK: -1: ONLYMESSAGE 3. Check a book item out for patron. 4. Check book item in. => Description of notforloan status should be displayed under 'Check in message'. => Confirm notforloan status HAS changed. 5. Apply patch and update database if needed 6. Set book items notforloan status as -1 (or create new one) 7. Check book item out for patron. 8. Check book item in. => Description of notforloan status should be displayed under 'Check in message'. => Confirm notforloan status HAS NOT changed. Also prove t/db_dependent/Circulation/issue.t Sponsored-by: Catalyst IT, New Zealand Signed-off-by: Anneli Österman Signed-off-by: Nick Clemens Signed-off-by: Katrin Fischer (cherry picked from commit a0f83767a81a1593f21f152d63fb493c14b8c85f) Signed-off-by: Fridolin Somers --- C4/Circulation.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index b98c267f4b..639b558c8a 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2228,7 +2228,7 @@ sub AddReturn { foreach my $notloan_rule_key (keys %{ $rules->{$item->itype}} ) { if ( $item->notforloan eq $notloan_rule_key ) { $messages->{'NotForLoanStatusUpdated'} = { from => $item->notforloan, to => $rules->{$item->itype}->{$notloan_rule_key} }; - $item->notforloan($rules->{$item->itype}->{$notloan_rule_key})->store({ log_action => 0, skip_record_index => 1, skip_holds_queue => 1 }); + $item->notforloan($rules->{$item->itype}->{$notloan_rule_key})->store({ log_action => 0, skip_record_index => 1, skip_holds_queue => 1 }) unless $rules->{$item->itype}->{$notloan_rule_key} eq 'ONLYMESSAGE'; last; } } -- 2.39.5