From ef28465dd1ae32febb14915210f4b8f010407c7c 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=UTF-8 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 --- C4/Circulation.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 562cad7267..1c15034cb9 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.30.2